skip empty paths with no contours
https://github.com/fonttools/fonttools/pull/2068#pullrequestreview-498472660
This commit is contained in:
parent
e1ad83add7
commit
7b9da7602c
@ -111,7 +111,11 @@ def removeOverlaps(
|
|||||||
for glyphName in glyphNames:
|
for glyphName in glyphNames:
|
||||||
glyph = glyfTable[glyphName]
|
glyph = glyfTable[glyphName]
|
||||||
# decompose composite glyphs only if components overlap each other
|
# decompose composite glyphs only if components overlap each other
|
||||||
if glyph.isComposite() and not componentsOverlap(glyph, glyphSet):
|
if (
|
||||||
|
glyph.numberOfContours == 0
|
||||||
|
or glyph.isComposite()
|
||||||
|
and not componentsOverlap(glyph, glyphSet)
|
||||||
|
):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
path = skPathFromGlyph(glyphName, glyphSet)
|
path = skPathFromGlyph(glyphName, glyphSet)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user