Skip to content

Commit d17578d

Browse files
committed
no message
1 parent dcbb8e5 commit d17578d

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,4 +100,5 @@ ENV/
100100
# mypy
101101
.mypy_cache/
102102

103-
*.ttf
103+
*.ttf
104+
out/

minimizeFont.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818
from PyQt5.QtCore import Qt
1919
from PyQt5.QtGui import QIntValidator
2020

21+
useUnichr = True
22+
if not useUnichr:
23+
unichr = str
24+
2125

2226
class askSetting(QDialog):
2327

@@ -165,7 +169,7 @@ def bye(self, items):
165169
count = 0
166170
print(u'\nGenerating EPS')
167171
for glyph in ttfFile.selection.byGlyphs:
168-
glyph.export("out/eps/"+str(glyph.unicode)+".eps")
172+
glyph.export("out/eps/"+unichr(glyph.unicode)+".eps")
169173
sys.stdout.write('.')
170174
sys.stdout.flush()
171175
count += 1
@@ -186,7 +190,7 @@ def bye(self, items):
186190
print(u'\nGenerating PNG @ '+pngSize)
187191
for glyph in ttfFile.selection.byGlyphs:
188192
glyph.export("out/png/"
189-
+ str(glyph.unicode)
193+
+ unichr(glyph.unicode)
190194
+ "."
191195
+ pngSize
192196
+ ".png",

0 commit comments

Comments
 (0)