Don't emit addVarComponent() if the component references the parent glyph (special case)
This commit is contained in:
parent
973dc5c9a7
commit
77add05f7f
@ -355,11 +355,17 @@ class _TTGlyphVARC(_TTGlyph):
|
||||
reset = comp.flags & VarComponentFlags.RESET_UNSPECIFIED_AXES
|
||||
with self.glyphSet.glyphSet.pushLocation(location, reset):
|
||||
with self.glyphSet.pushLocation(location, reset):
|
||||
try:
|
||||
pen.addVarComponent(
|
||||
comp.glyphName, transform, self.glyphSet.rawLocation
|
||||
)
|
||||
except AttributeError:
|
||||
shouldDecompose = self.name == comp.glyphName
|
||||
|
||||
if not shouldDecompose:
|
||||
try:
|
||||
pen.addVarComponent(
|
||||
comp.glyphName, transform, self.glyphSet.rawLocation
|
||||
)
|
||||
except AttributeError:
|
||||
shouldDecompose = True
|
||||
|
||||
if shouldDecompose:
|
||||
t = transform.toTransform()
|
||||
compGlyphSet = (
|
||||
self.glyphSet
|
||||
|
Loading…
x
Reference in New Issue
Block a user