glyf: setCoordinates must not modify input coord parameter
make a copy instead
This commit is contained in:
parent
fb914c93c4
commit
a571eee8d6
@ -379,8 +379,7 @@ class table__g_l_y_f(DefaultTable.DefaultTable):
|
|||||||
topSideY = coord[-2][1]
|
topSideY = coord[-2][1]
|
||||||
bottomSideY = coord[-1][1]
|
bottomSideY = coord[-1][1]
|
||||||
|
|
||||||
for _ in range(4):
|
coord = coord[:-4]
|
||||||
del coord[-1]
|
|
||||||
|
|
||||||
if glyph.isComposite():
|
if glyph.isComposite():
|
||||||
assert len(coord) == len(glyph.components)
|
assert len(coord) == len(glyph.components)
|
||||||
@ -391,7 +390,7 @@ class table__g_l_y_f(DefaultTable.DefaultTable):
|
|||||||
assert len(coord) == 0
|
assert len(coord) == 0
|
||||||
else:
|
else:
|
||||||
assert len(coord) == len(glyph.coordinates)
|
assert len(coord) == len(glyph.coordinates)
|
||||||
glyph.coordinates = coord
|
glyph.coordinates = GlyphCoordinates(coord)
|
||||||
|
|
||||||
glyph.recalcBounds(self)
|
glyph.recalcBounds(self)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user