Skip to content

Commit

Permalink
Version 4
Browse files Browse the repository at this point in the history
  • Loading branch information
PanderMusubi committed Mar 4, 2017
1 parent fb87757 commit de0b799
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/fonts/import.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
continue
# print('DEBUG: svg', svgfile)
try:
uni = int(svgfile.split('_')[0], 16)
src = svgfile.split('_')[0]
uni = int(src, 16)
except:
print('ERROR: Invalid glyph unicode value in file name: %s'%(svgfile.split('_')[0]))
exit(1)
Expand All @@ -39,7 +40,8 @@
if font:
glyph = font.createChar(uni, gname)
glyph.clear()
glyph.importOutlines(path.join(glyphDir, svgfile))
if src != '0020':#TODO test
glyph.importOutlines(path.join(glyphDir, svgfile))
glyph.width = 725 #TODO how to set this globally?
else:
# Test run from outside of Fontforge
Expand Down Expand Up @@ -89,7 +91,6 @@
glyph.addReference(ref_gname, (-1.0, 0.0, 0.0, 1.0, 725.0, 0.0))
else:
print('ERROR: Unknown operation')
pass
glyph.width = 725 #TODO how to set this globally?
else:
print('WARNING: Destination %s (U%s) %s has unavailable reference %s (U%s) %s, skipping, please reorder reference file or add SVG sources'%(dst_uni, dst, dst_gname, ref_uni, ref, ref_gname))

0 comments on commit de0b799

Please sign in to comment.