[avar] Remove fixupSegments
Fixes https://github.com/fonttools/fonttools/issues/923
This commit is contained in:
parent
e9eb1f3297
commit
e886617ab0
@ -69,7 +69,6 @@ class table__a_v_a_r(DefaultTable.DefaultTable):
|
|||||||
fromValue, toValue = struct.unpack(">hh", data[pos:pos+4])
|
fromValue, toValue = struct.unpack(">hh", data[pos:pos+4])
|
||||||
segments[fixedToFloat(fromValue, 14)] = fixedToFloat(toValue, 14)
|
segments[fixedToFloat(fromValue, 14)] = fixedToFloat(toValue, 14)
|
||||||
pos = pos + 4
|
pos = pos + 4
|
||||||
self.fixupSegments_()
|
|
||||||
|
|
||||||
def toXML(self, writer, ttFont, progress=None):
|
def toXML(self, writer, ttFont, progress=None):
|
||||||
axisTags = [axis.axisTag for axis in ttFont["fvar"].axes]
|
axisTags = [axis.axisTag for axis in ttFont["fvar"].axes]
|
||||||
@ -96,11 +95,3 @@ class table__a_v_a_r(DefaultTable.DefaultTable):
|
|||||||
log.warning("duplicate entry for %s in axis '%s'",
|
log.warning("duplicate entry for %s in axis '%s'",
|
||||||
fromValue, axis)
|
fromValue, axis)
|
||||||
segment[fromValue] = toValue
|
segment[fromValue] = toValue
|
||||||
self.fixupSegments_()
|
|
||||||
|
|
||||||
def fixupSegments_(self):
|
|
||||||
for axis, mappings in self.segments.items():
|
|
||||||
for k in [-1.0, 0.0, 1.0]:
|
|
||||||
if mappings.get(k) != k:
|
|
||||||
log.warning("avar axis '%s' should map %s to %s", axis, k, k)
|
|
||||||
mappings[k] = k
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user