[ttGlyphSet] Only decompose VarComposites on AttributeError

Keep NotImplementedError for clients to really say don't want it.
This commit is contained in:
Behdad Esfahbod 2023-02-03 13:32:10 -07:00
parent a14a02ecc2
commit e374af919d
2 changed files with 1 additions and 4 deletions

View File

@ -102,9 +102,6 @@ class DecomposingRecordingPen(DecomposingPen, RecordingPen):
b: [('moveTo', ((-1, 1),)), ('curveTo', ((0, 2), (1, 3), (2, 4))), ('closePath', ())]
"""
def addVarComponent(self, glyphName, transformation, location):
raise NotImplementedError
# raises KeyError if base glyph is not found in glyphSet
skipMissingComponents = False

View File

@ -194,7 +194,7 @@ class _TTGlyphGlyf(_TTGlyph):
pen.addVarComponent(
comp.glyphName, comp.transform, self.glyphSet.rawLocation
)
except (NotImplementedError, AttributeError):
except AttributeError:
t = comp.transform.toTransform()
if isPointPen:
tPen = TransformPointPen(pen, t)