1
header = """<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
<!-- Created with Inkscape (http://www.inkscape.org/) -->
4
xmlns:svg="http://www.w3.org/2000/svg"
5
xmlns="http://www.w3.org/2000/svg"
21
transform="translate({xtransform},{ytransform})"
24
style="fill:none;stroke:#000000;stroke-width:3"
34
d="M 2.6554782,932.07281 L 97.293604,932.07281"
40
style="font-size:16px;text-align:center;text-anchor:middle;fill:#000000;font-family:DejaVu Sans"
42
xml:space="preserve"><tspan
45
id="text_">{text} {code}</tspan></text>
51
combiningdiacriticals = (0x0300, 0x036f)
52
punctuation = (0x2000, 0x206f)
53
greek = (0x0370, 0x03ff)
54
subsuperscripts = (0x2070, 0x20ff)
55
letterlike = (0x2100, 0x214f)
56
mathematical = (0x2200, 0x22ff)
57
cyrillic = (0x400, 0x04ff)
58
hebrew = (0x0590, 0x05ff)
59
katakana = (0x30A0, 0x30ff)
60
hiragana = (0x3040, 0x309f)
63
#codeblocks.append(combiningdiacriticals)
64
#codeblocks.append(punctuation)
65
#codeblocks.append(greek)
66
#codeblocks.append(subsuperscripts)
67
#codeblocks.append(letterlike)
68
#codeblocks.append(mathematical)
69
#codeblocks.append(cyrillic)
70
#codeblocks.append(hebrew)
71
#codeblocks.append(katakana)
72
codeblocks.append(hiragana)
77
for codeblock in codeblocks:
78
for glyph in range(codeblock[0], codeblock[1]):
86
complete_svg += footer
87
f = open('page'+str(page)+'.svg', 'w')
92
entity = '&#'+str(glyph)+';'
94
newglyph = newglyph.replace("{xtransform}",str(col*100))#these calculations arent right.
95
newglyph = newglyph.replace("{ytransform}",str((row*150)*-1))#these calculations arent right.
96
newglyph = newglyph.replace("{text}",entity)
97
newglyph = newglyph.replace("{id}",str(glyph))
98
newglyph = newglyph.replace("{code}",hex(glyph))
99
complete_svg += newglyph
100
#print('&#'+str(glyph)+';')
b'\\ No newline at end of file'