[instancer/VarComposite] Raise NotImplementedError when warranted

This commit is contained in:
Behdad Esfahbod 2023-01-17 21:14:06 -07:00
parent 9475dccbea
commit e4c25d02e6

View File

@ -492,6 +492,15 @@ def _instantiateGvarGlyph(
if defaultDeltas:
coordinates += _g_l_y_f.GlyphCoordinates(defaultDeltas)
glyph = glyf[glyphname]
if glyph.isVarComposite():
for component in glyph.components:
for tag, loc in component.location.items():
if tag in axisLimits:
raise NotImplementedError(
"Instancing accross VarComposite axes is not supported."
)
# _setCoordinates also sets the hmtx/vmtx advance widths and sidebearings from
# the four phantom points and glyph bounding boxes.
# We call it unconditionally even if a glyph has no variations or no deltas are