[gvar] Avoid decompiling glyphs that don't have variations
This commit is contained in:
parent
5a0dc4bc8d
commit
3a258573af
@ -95,9 +95,12 @@ class table__g_v_a_r(DefaultTable.DefaultTable):
|
|||||||
result = []
|
result = []
|
||||||
glyf = ttFont['glyf']
|
glyf = ttFont['glyf']
|
||||||
for glyphName in ttFont.getGlyphOrder():
|
for glyphName in ttFont.getGlyphOrder():
|
||||||
|
variations = self.variations.get(glyphName, [])
|
||||||
|
if not variations:
|
||||||
|
result.append(b"")
|
||||||
|
continue
|
||||||
glyph = glyf[glyphName]
|
glyph = glyf[glyphName]
|
||||||
pointCount = self.getNumPoints_(glyph)
|
pointCount = self.getNumPoints_(glyph)
|
||||||
variations = self.variations.get(glyphName, [])
|
|
||||||
result.append(compileGlyph_(variations, pointCount,
|
result.append(compileGlyph_(variations, pointCount,
|
||||||
axisTags, sharedCoordIndices))
|
axisTags, sharedCoordIndices))
|
||||||
return result
|
return result
|
||||||
|
Loading…
x
Reference in New Issue
Block a user