3 # Generates an SVG Font where each glyph (identified on stdin by four
4 # hex characters) consists of a bit pattern representing the Unicode
5 # code point it is the glyph for.
10 <svg xmlns="http://www.w3.org/2000/svg">
11 <font id="BitPattern" horiz-adv-x="1000">
12 <font-face font-family="BitPattern" units-per-em="1000" ascent="800"/>
18 die unless /^[0-9A-Fa-f]{4}$/;
20 my $s = " <glyph unicode='&#x$_;' d='";
21 for (my $i = 0; $i < 32; $i++) {
23 my $x = 100 * (7 - ($i % 8));
24 my $y = 100 * int($i / 8);
25 $s .= "M$x,$y v80h80v-80z ";