[subset] Fix glyf component closure

https://github.com/behdad/fonttools/pull/11
This commit is contained in:
Behdad Esfahbod 2013-09-27 12:59:47 -04:00
parent bb56ddb971
commit 043108cbdb
2 changed files with 3 additions and 3 deletions

View File

@ -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)

View File

@ -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 []