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:
parent
1e6f8bc39b
commit
7b5202cd79
@ -372,8 +372,6 @@ class table__g_l_y_f(DefaultTable.DefaultTable):
|
|||||||
|
|
||||||
# Handle phantom points for (left, right, top, bottom) positions.
|
# Handle phantom points for (left, right, top, bottom) positions.
|
||||||
assert len(coord) >= 4
|
assert len(coord) >= 4
|
||||||
if not hasattr(glyph, 'xMin'):
|
|
||||||
glyph.recalcBounds(self)
|
|
||||||
leftSideX = coord[-4][0]
|
leftSideX = coord[-4][0]
|
||||||
rightSideX = coord[-3][0]
|
rightSideX = coord[-3][0]
|
||||||
topSideY = coord[-2][1]
|
topSideY = coord[-2][1]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user