[gvar] Don't expand glyph during decompile if no variation data
This commit is contained in:
parent
73923b3a1e
commit
96de954d29
@ -119,9 +119,11 @@ class table__g_v_a_r(DefaultTable.DefaultTable):
|
|||||||
glyf = ttFont['glyf']
|
glyf = ttFont['glyf']
|
||||||
|
|
||||||
def decompileVarGlyph(glyphName, gid):
|
def decompileVarGlyph(glyphName, gid):
|
||||||
|
gvarData = data[offsetToData + offsets[gid] : offsetToData + offsets[gid + 1]]
|
||||||
|
if not gvarData:
|
||||||
|
return []
|
||||||
glyph = glyf[glyphName]
|
glyph = glyf[glyphName]
|
||||||
numPointsInGlyph = self.getNumPoints_(glyph)
|
numPointsInGlyph = self.getNumPoints_(glyph)
|
||||||
gvarData = data[offsetToData + offsets[gid] : offsetToData + offsets[gid + 1]]
|
|
||||||
return decompileGlyph_(numPointsInGlyph, sharedCoords, axisTags, gvarData)
|
return decompileGlyph_(numPointsInGlyph, sharedCoords, axisTags, gvarData)
|
||||||
|
|
||||||
for gid in range(self.glyphCount):
|
for gid in range(self.glyphCount):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user