[avar] Fix assertion
Fixes https://github.com/fonttools/fonttools/issues/3546
This commit is contained in:
parent
313328bf0d
commit
f4669f0538
@ -143,7 +143,9 @@ class table__a_v_a_r(BaseTTXConverter):
|
|||||||
|
|
||||||
def renormalizeLocation(self, location, font):
|
def renormalizeLocation(self, location, font):
|
||||||
|
|
||||||
if self.majorVersion not in (1, 2):
|
majorVersion = getattr(self, "majorVersion", 1)
|
||||||
|
|
||||||
|
if majorVersion not in (1, 2):
|
||||||
raise NotImplementedError("Unknown avar table version")
|
raise NotImplementedError("Unknown avar table version")
|
||||||
|
|
||||||
avarSegments = self.segments
|
avarSegments = self.segments
|
||||||
@ -154,7 +156,7 @@ class table__a_v_a_r(BaseTTXConverter):
|
|||||||
value = piecewiseLinearMap(value, avarMapping)
|
value = piecewiseLinearMap(value, avarMapping)
|
||||||
mappedLocation[axisTag] = value
|
mappedLocation[axisTag] = value
|
||||||
|
|
||||||
if self.majorVersion < 2:
|
if majorVersion < 2:
|
||||||
return mappedLocation
|
return mappedLocation
|
||||||
|
|
||||||
# Version 2
|
# Version 2
|
||||||
|
Loading…
x
Reference in New Issue
Block a user