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
|
reset = comp.flags & VarComponentFlags.RESET_UNSPECIFIED_AXES
|
||||||
with self.glyphSet.glyphSet.pushLocation(location, reset):
|
with self.glyphSet.glyphSet.pushLocation(location, reset):
|
||||||
with self.glyphSet.pushLocation(location, reset):
|
with self.glyphSet.pushLocation(location, reset):
|
||||||
try:
|
shouldDecompose = self.name == comp.glyphName
|
||||||
pen.addVarComponent(
|
|
||||||
comp.glyphName, transform, self.glyphSet.rawLocation
|
if not shouldDecompose:
|
||||||
)
|
try:
|
||||||
except AttributeError:
|
pen.addVarComponent(
|
||||||
|
comp.glyphName, transform, self.glyphSet.rawLocation
|
||||||
|
)
|
||||||
|
except AttributeError:
|
||||||
|
shouldDecompose = True
|
||||||
|
|
||||||
|
if shouldDecompose:
|
||||||
t = transform.toTransform()
|
t = transform.toTransform()
|
||||||
compGlyphSet = (
|
compGlyphSet = (
|
||||||
self.glyphSet
|
self.glyphSet
|
||||||
|
Loading…
x
Reference in New Issue
Block a user