[ttFont] Make setGlyphOrder() clear reverseGlyphOrderMap

Part of https://github.com/fonttools/fonttools/pull/2398
This commit is contained in:
Behdad Esfahbod 2021-08-23 13:56:43 -06:00
parent e5bf2a7f1a
commit d5de11d805
2 changed files with 2 additions and 1 deletions

View File

@ -2864,7 +2864,6 @@ class Subsetter(object):
glyphOrder = [g for g in glyphOrder if font.getGlyphID(g) <= self.last_retained_order]
font.setGlyphOrder(glyphOrder)
font._buildReverseGlyphOrderDict()
def _prune_post_subset(self, font):

View File

@ -413,6 +413,8 @@ class TTFont(object):
def setGlyphOrder(self, glyphOrder):
self.glyphOrder = glyphOrder
if hasattr(self, '_reverseGlyphOrderDict'):
delattr(self, '_reverseGlyphOrderDict')
def getGlyphOrder(self):
try: