From 5454989987ff899973fb102e2d4ad8e1e30bc465 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 24 Aug 2022 13:30:09 -0600 Subject: [PATCH] [ttGlyphSet] Copy glyph components before shifting Fixes https://github.com/fonttools/fonttools/issues/2774 --- Lib/fontTools/ttLib/ttGlyphSet.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Lib/fontTools/ttLib/ttGlyphSet.py b/Lib/fontTools/ttLib/ttGlyphSet.py index be26215b7..67cf4706c 100644 --- a/Lib/fontTools/ttLib/ttGlyphSet.py +++ b/Lib/fontTools/ttLib/ttGlyphSet.py @@ -153,6 +153,7 @@ def _setCoordinates(glyph, coord, glyfTable): if glyph.isComposite(): assert len(coord) == len(glyph.components) + glyph.components = [copy(comp) for comp in glyph.components] for p,comp in zip(coord, glyph.components): if hasattr(comp, 'x'): comp.x,comp.y = p