[subset] Fix glyf component closure
https://github.com/behdad/fonttools/pull/11
This commit is contained in:
parent
bb56ddb971
commit
043108cbdb
@ -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)
|
||||
|
@ -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 []
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user