From 043108cbdb6a18bf0871410796d346ed86098aaa Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 27 Sep 2013 12:59:47 -0400 Subject: [PATCH] [subset] Fix glyf component closure https://github.com/behdad/fonttools/pull/11 --- Lib/fontTools/subset.py | 2 +- Lib/fontTools/ttLib/tables/_g_l_y_f.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Lib/fontTools/subset.py b/Lib/fontTools/subset.py index eb21076ff..36a349ef2 100644 --- a/Lib/fontTools/subset.py +++ b/Lib/fontTools/subset.py @@ -1155,7 +1155,7 @@ def closure_glyphs(self, s): if g not in self.glyphs: continue gl = self.glyphs[g] - for c in gl.getComponents(self): + for c in gl.getComponentNames(self): if c not in s.glyphs: components.add(c) components = set(c for c in components if c not in s.glyphs) diff --git a/Lib/fontTools/ttLib/tables/_g_l_y_f.py b/Lib/fontTools/ttLib/tables/_g_l_y_f.py index f5ab386d5..2b1e1a1f8 100644 --- a/Lib/fontTools/ttLib/tables/_g_l_y_f.py +++ b/Lib/fontTools/ttLib/tables/_g_l_y_f.py @@ -606,10 +606,10 @@ class Glyph: else: return GlyphCoordinates(), [], array.array("B") - def getComponents(self, glyfTable): + def getComponentNames(self, glyfTable): if not hasattr(self, "data"): if self.isComposite(): - return self.components + return [c.glyphName for c in self.components] else: return []