htdebeer / SVG-cards

A set of playing cards in SVG (now also with a rendering in PNG)
GNU Lesser General Public License v2.1
147 stars 45 forks source link

Misplaced "J" ? #6

Closed ThorvaldAagaard closed 4 years ago

ThorvaldAagaard commented 4 years ago

Using the deck for selecting cards for a hand got me to notice this: image

Looking at the SVG-file I can see there is a different font-size for the J (And in fact also for the Queen)

Shouldn't all have the same size?

htdebeer commented 4 years ago

Sort of, yes. The problem is that some letters are wider or taller than others, so some extra sizing and alignment is needed. More importantly, though, this should be different for each font because the size and shape of these letters is different in each font. In the SVG Cards SVG file, we use the free font DejaVu Serif. This font is chosen because it is the free font that matches the font commonly used in the French representation best. If your SVG render engine cannot find this font, it replaces it by something else. There is no guarantee that this other font will look good at all.

Possible solutions:

ThorvaldAagaard commented 4 years ago

Thank you. I have added the font to my application

If you are interested I have added a fill color to all cards, so it now is possible to color the suits image

Let me know if you want a copy of that

It should probably just inherit the color when referencing the card, but I did not know how to make a default fill.

I also change the 10 to T as that works better in an application

htdebeer commented 4 years ago

That's some very different colors you've got there! With SVG Cards I am trying to recreate the French card representation as true as possible. However, I can understand others being interested in a feature like this. If you want, I can add a section to the README listing alternative representations and applications like your's.

ThorvaldAagaard commented 4 years ago

I haven't invented the colors :-) https://en.wikipedia.org/wiki/Four-color_deck There is a sneak preview of my site at https://snippen.dk, but I will give you the final website for the readme, when I'm done

At the end the colors will probably be some setting the user can change

htdebeer commented 4 years ago

Interesting! I have never seen other colored decks and just assumed this was the norm. Talking about being cultural blind!

I'm looking forward for your final application. Maybe I should invite others to send in hyperlinks and descriptions to their applications as well. To be honest, I am sort of curious to know what people have build with these cards.