glyf: only recalcBounds once in setCoordinates

glyph.recalcBounds is called unconditionally a few lines below within the same
setCoordinates method, just after setting the new glyph's coordinates.
We don't need to call recalcBounds twice.
Only empty glyphs with numberOfContours == 0 may not have xMin set.
recalcBounds ensure it's set to 0 for those.
This commit is contained in:
Cosimo Lupo 2019-04-20 15:16:02 +01:00
parent 1e6f8bc39b
commit 7b5202cd79
No known key found for this signature in database
GPG Key ID: 179A8F0895A02F4F

View File

@ -372,8 +372,6 @@ class table__g_l_y_f(DefaultTable.DefaultTable):
# Handle phantom points for (left, right, top, bottom) positions.
assert len(coord) >= 4
if not hasattr(glyph, 'xMin'):
glyph.recalcBounds(self)
leftSideX = coord[-4][0]
rightSideX = coord[-3][0]
topSideY = coord[-2][1]