Skip to content

Commit

Permalink
[outlineCompiler] add zero-contour TTGlyph if has invalid curveTo
Browse files Browse the repository at this point in the history
  • Loading branch information
anthrotype committed Oct 17, 2017
1 parent d6a056a commit 221998b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Lib/ufo2ft/outlineCompiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from fontTools.pens.ttGlyphPen import TTGlyphPen
from fontTools.ttLib.tables.O_S_2f_2 import Panose
from fontTools.ttLib.tables._h_e_a_d import mac_epoch_diff
from fontTools.ttLib.tables._g_l_y_f import USE_MY_METRICS
from fontTools.ttLib.tables._g_l_y_f import Glyph, USE_MY_METRICS
from fontTools.misc.arrayTools import unionRect

from ufo2ft.fontInfoData import getAttrWithFallback, dateStringToTimeValue, dateStringForNow, intListToNum, normalizeStringForPostscript
Expand Down Expand Up @@ -1054,11 +1054,12 @@ def setupTable_glyf(self):
glyph.draw(pen)
except NotImplementedError:
logger.error("%r has invalid curve format; skipped", name)
ttGlyph = Glyph()
else:
ttGlyph = pen.glyph()
if ttGlyph.isComposite() and self.autoUseMyMetrics:
self.autoUseMyMetrics(ttGlyph, glyph.width, allGlyphs)
glyf[name] = ttGlyph
glyf[name] = ttGlyph

@staticmethod
def autoUseMyMetrics(ttGlyph, width, glyphSet):
Expand Down

0 comments on commit 221998b

Please sign in to comment.