[varLib] Remove unused VarAxisID
This commit is contained in:
parent
ae93928275
commit
846d969209
@ -231,23 +231,6 @@ class GlyphID(SimpleValue):
|
|||||||
def write(self, writer, font, tableDict, value, repeatIndex=None):
|
def write(self, writer, font, tableDict, value, repeatIndex=None):
|
||||||
writer.writeUShort(font.getGlyphID(value))
|
writer.writeUShort(font.getGlyphID(value))
|
||||||
|
|
||||||
class VarAxisID(SimpleValue):
|
|
||||||
staticSize = 2
|
|
||||||
def read(self, reader, font, tableDict):
|
|
||||||
idx = reader.readUShort()
|
|
||||||
try:
|
|
||||||
return font['fvar'].axes[idx].axisTag
|
|
||||||
except (KeyError, IndexError):
|
|
||||||
return idx
|
|
||||||
def write(self, writer, font, tableDict, value, repeatIndex=None):
|
|
||||||
if not isinstance(value, int):
|
|
||||||
value = tobytes(value)
|
|
||||||
for i,axis in enumerate(font['fvar'].axes):
|
|
||||||
if axis.axisTag == value:
|
|
||||||
value = i
|
|
||||||
break
|
|
||||||
writer.writeUShort(value)
|
|
||||||
|
|
||||||
class FloatValue(SimpleValue):
|
class FloatValue(SimpleValue):
|
||||||
def xmlRead(self, attrs, content, font):
|
def xmlRead(self, attrs, content, font):
|
||||||
return float(attrs["value"])
|
return float(attrs["value"])
|
||||||
@ -613,7 +596,6 @@ converterMapping = {
|
|||||||
"Offset": Table,
|
"Offset": Table,
|
||||||
"LOffset": LTable,
|
"LOffset": LTable,
|
||||||
"ValueRecord": ValueRecord,
|
"ValueRecord": ValueRecord,
|
||||||
"VarAxisID": VarAxisID,
|
|
||||||
"DeltaValue": DeltaValue,
|
"DeltaValue": DeltaValue,
|
||||||
"VarIdxMapValue": VarIdxMapValue,
|
"VarIdxMapValue": VarIdxMapValue,
|
||||||
"VarDataValue": VarDataValue,
|
"VarDataValue": VarDataValue,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user