From 3529a44f7527cbc54ab048f9f4c54408e926053e Mon Sep 17 00:00:00 2001 From: Cosimo Lupo Date: Thu, 10 Mar 2022 11:29:17 +0000 Subject: [PATCH] Update glyf's glyphOrder when calling TTFont.setGlyphOrder() https://github.com/fonttools/fonttools/issues/2060#issuecomment-1063932428 --- Lib/fontTools/ttLib/ttFont.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Lib/fontTools/ttLib/ttFont.py b/Lib/fontTools/ttLib/ttFont.py index 9948d4e2f..692f99ac8 100644 --- a/Lib/fontTools/ttLib/ttFont.py +++ b/Lib/fontTools/ttLib/ttFont.py @@ -451,6 +451,8 @@ class TTFont(object): self.glyphOrder = glyphOrder if hasattr(self, '_reverseGlyphOrderDict'): del self._reverseGlyphOrderDict + if self.isLoaded("glyf"): + self["glyf"].setGlyphOrder(glyphOrder) def getGlyphOrder(self): """Returns a list of glyph names ordered by their position in the font."""