[gvar] Take glyphs from gvar.variations
When compiling the set of shared coordinates, walk over glyphs in
self.variations instead of retrieving them in glyph order.
This addresses a code review comment:
0f86c1c0d3 (commitcomment-11375190)
This commit is contained in:
parent
1447730438
commit
5ba59b3f4b
@ -86,9 +86,8 @@ class table__g_v_a_r(DefaultTable.DefaultTable):
|
||||
|
||||
def compileSharedCoords_(self, ttFont, axisTags):
|
||||
coordCount = {}
|
||||
for glyph in ttFont.getGlyphOrder():
|
||||
if glyph in self.variations:
|
||||
for gvar in self.variations[glyph]:
|
||||
for glyph, variations in self.variations.items():
|
||||
for gvar in variations:
|
||||
coord = gvar.compileCoord(axisTags)
|
||||
coordCount[coord] = coordCount.get(coord, 0) + 1
|
||||
sharedCoords = [(count, coord) for (coord, count) in coordCount.items() if count > 1]
|
||||
|
Loading…
x
Reference in New Issue
Block a user