Skip to content

Commit

Permalink
Fixes glyph names not persisting when patching fonts (fixes #41)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanoasis committed Nov 11, 2015
1 parent b0b1e11 commit fc83985
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion font-patcher
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,9 @@ def copy_glyphs(sourceFont, sourceFontStart, sourceFontEnd, symbolFont, symbolFo

for sym_glyph in symbolFont.selection.byGlyphs:
#sym_attr = SYM_ATTR[sym_glyph.unicode]
glyphName = sym_glyph.glyphname
if args.quiet == False:
print "updating glyph: " + str(sym_glyph)
print "updating glyph: " + str(sym_glyph) + " " + str(sym_glyph.glyphname)

if exactEncoding:
# use the exact same hex values for the source font as for the symbol font
Expand All @@ -292,6 +293,7 @@ def copy_glyphs(sourceFont, sourceFontStart, sourceFontEnd, symbolFont, symbolFo
# Select and paste symbol to its unicode code point
sourceFont.selection.select(currentSourceFontGlyph)
sourceFont.paste()
sourceFont[currentSourceFontGlyph].glyphname = glyphName

if args.single:
# Now that we have copy/pasted the glyph, it's time to scale and move it
Expand Down

0 comments on commit fc83985

Please sign in to comment.