prog: (Default)
[personal profile] prog
In a crafty mood this evening, so made an SVG card deck. Note that clicking that link will probably make one of two things happen for you, at least if your computer it set up like mine: you'll get a cascade of nigh-meaningless XML (if you don't have Adobe's SVG Viewer plugin installed) or (if you do) you'll see something that looks like a deck of cards, except with hollow squares replacing every suit symbol. This is because I used fonts for every symbol on every card; the only manually-defined shape was the border rectangles. Alas, most fonts don't support the Unicode "miscellaneous symbols" space I plucked these glyphs from. So, yes: like everything else I try to make, it's broken because I'm just too cutting-edge.

Actually, Squiggle renders them pretty nicely, so I took a couple of screen-samplings from that.

There actually was a practical point to this exercise, viz: remove all the <use> elements from the document, and you got yourself a nice, non-displaying library of SVG symbols, ready for manipulation by strange & alien forces, such as ECMAScript. Can you guess that I did this in order to take a break from cleaning up the Volity paper, which is about a remarkably similar topic?

Shocked and appalled that the month is more than half over. I'll try to have this paper done by XMas.
(deleted comment)

Date: 2003-12-19 05:48 am (UTC)
From: [identity profile] prog.livejournal.com
Oo, oo, that's great. What'd ya use, Adobe SVG Viewer 3.0 w/ Windows?

I'm really curious about what font it uses for both the suit-symbols (which several fonts on my system can draw) and the chess-icons (which only one font can... and when I try to invoke it by name in the SVG document, my SVG Viewer picks one with a similar name, but not the right one. Gah.) I'm guessing that a better-programmed viewer knows about fonts that can draw special characters, and switches to them when they show up, but I'm not sure...

Date: 2003-12-19 06:51 am (UTC)
From: [identity profile] rikchik.livejournal.com
I have no idea what's installed on my machine, but it more or less works for me. The chess symbols don't work, and "jmac.org" is too large to fit in the spade symbol, but other than that it's good. I like your jokers too :)

Date: 2003-12-19 07:34 am (UTC)
From: [identity profile] prog.livejournal.com
I was thinking I could punt and put a black stroke around the "jmac.org", so overlapping would at least be readable. I'm sure there's more clever things I can do to force the spade and the letters into a fixed size, even though they're both text, but I've only just started reading my SVG book. :)

(I also want to put 'JOKER' in an arc-path around the smileys, and make a pattern for the card back (that's what the entirely blank card's supposed to be), but that too is many chapters upstream.)

August 2022

S M T W T F S
 123456
78910111213
14151617181920
21222324252627
28 293031   

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Aug. 12th, 2025 07:37 pm
Powered by Dreamwidth Studios