[gvar] Don't expand glyph for unused pointCount

Keep it in the API though.
This commit is contained in:
Behdad Esfahbod 2022-12-08 16:39:04 -07:00
parent 96de954d29
commit 6aca5be9b7
2 changed files with 4 additions and 3 deletions

View File

@ -632,6 +632,8 @@ def compileSharedTuples(axisTags, variations,
def compileTupleVariationStore(variations, pointCount,
axisTags, sharedTupleIndices,
useSharedPoints=True):
# pointCount is actually unused. Keeping for API compat.
del pointCount
newVariations = []
pointDatas = []
# Compile all points and figure out sharing if desired

View File

@ -99,9 +99,8 @@ class table__g_v_a_r(DefaultTable.DefaultTable):
if not variations:
result.append(b"")
continue
glyph = glyf[glyphName]
pointCount = self.getNumPoints_(glyph)
result.append(compileGlyph_(variations, pointCount,
pointCountUnused = 0 # pointCount is actually unused by compileGlyph
result.append(compileGlyph_(variations, pointCountUnused,
axisTags, sharedCoordIndices))
return result