Skip to content

Commit

Permalink
[instancer] Raise NotImplementedError if avar2 VarStore present
Browse files Browse the repository at this point in the history
  • Loading branch information
behdad committed Apr 15, 2024
1 parent 705acc9 commit e724acd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Lib/fontTools/varLib/instancer/__init__.py
Expand Up @@ -1019,7 +1019,11 @@ def _isValidAvarSegmentMap(axisTag, segmentMap):
def instantiateAvar(varfont, axisLimits):
# 'axisLimits' dict must contain user-space (non-normalized) coordinates.

segments = varfont["avar"].segments
avar = varfont["avar"]
if getattr(avar, "majorVersion", 1) >= 2 and avar.table.VarStore:
raise NotImplementedError("avar table with VarStore is not supported")

segments = avar.segments

# drop table if we instantiate all the axes
pinnedAxes = set(axisLimits.pinnedLocation())
Expand Down Expand Up @@ -1080,7 +1084,7 @@ def instantiateAvar(varfont, axisLimits):
newSegments[axisTag] = newMapping
else:
newSegments[axisTag] = mapping
varfont["avar"].segments = newSegments
avar.segments = newSegments


def isInstanceWithinAxisRanges(location, axisRanges):
Expand Down

0 comments on commit e724acd

Please sign in to comment.