[glyf] Use a boundsCache within _setCoordinates

Speeds up "pixel" fonts that reuse the same component a lot.
Speeds up instantiating Handjet by 47%.
This commit is contained in:
Behdad Esfahbod 2023-10-14 13:02:21 -04:00
parent e1117da0af
commit 67be79d77a

View File

@ -502,7 +502,7 @@ class table__g_l_y_f(DefaultTable.DefaultTable):
assert len(coord) == len(glyph.coordinates)
glyph.coordinates = GlyphCoordinates(coord)
glyph.recalcBounds(self)
glyph.recalcBounds(self, boundsDone=set())
horizontalAdvanceWidth = otRound(rightSideX - leftSideX)
if horizontalAdvanceWidth < 0: