[varLib] Use Tag() in fvar
This commit is contained in:
parent
938129b802
commit
3da7de7452
@ -139,7 +139,7 @@ class Axis(object):
|
|||||||
for tag, _, value in filter(lambda t: type(t) is tuple, content):
|
for tag, _, value in filter(lambda t: type(t) is tuple, content):
|
||||||
value = ''.join(value)
|
value = ''.join(value)
|
||||||
if tag == "AxisTag":
|
if tag == "AxisTag":
|
||||||
self.axisTag = value
|
self.axisTag = Tag(value)
|
||||||
elif tag in ["MinValue", "DefaultValue", "MaxValue", "NameID"]:
|
elif tag in ["MinValue", "DefaultValue", "MaxValue", "NameID"]:
|
||||||
setattr(self, tag[0].lower() + tag[1:], safeEval(value))
|
setattr(self, tag[0].lower() + tag[1:], safeEval(value))
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ def _add_fvar(font, axes, axis_names, instances):
|
|||||||
|
|
||||||
for tag in sorted(axes.keys()):
|
for tag in sorted(axes.keys()):
|
||||||
axis = Axis()
|
axis = Axis()
|
||||||
axis.axisTag = tag
|
axis.axisTag = Tag(tag)
|
||||||
axis.minValue, axis.defaultValue, axis.maxValue = axes[tag]
|
axis.minValue, axis.defaultValue, axis.maxValue = axes[tag]
|
||||||
axis.nameID = _AddName(font, axis_names[tag]).nameID
|
axis.nameID = _AddName(font, axis_names[tag]).nameID
|
||||||
fvar.axes.append(axis)
|
fvar.axes.append(axis)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user