[VARC] Use a DeltaSetIndexMap
This commit is contained in:
parent
d37b3942ee
commit
58bb96be91
@ -3392,11 +3392,7 @@ otData = [
|
||||
(
|
||||
"AxisValuesList",
|
||||
[
|
||||
# A hack here would be to encode the VarIndex as the first member
|
||||
# of the tuple to stored. But I find that ugly. The current
|
||||
# design is not ideal but cleaner.
|
||||
("uint32", "VarIndicesCount", None, None, ""),
|
||||
("VarIndex", "VarIndices", "VarIndicesCount", 0, ""),
|
||||
("LOffsetTo(DeltaSetIndexMap)", "VarIndices", None, None, ""),
|
||||
("TupleList", "Item", "", 0, ""),
|
||||
],
|
||||
),
|
||||
|
@ -306,8 +306,8 @@ class _TTGlyphVARC(_TTGlyph):
|
||||
axisValues = Vector(varc.AxisValuesList.Item[comp.AxisValuesIndex])
|
||||
# Apply variations
|
||||
varIdx = NO_VARIATION_INDEX
|
||||
if comp.AxisValuesIndex < varc.AxisValuesList.VarIndicesCount:
|
||||
varIdx = varc.AxisValuesList.VarIndices[comp.AxisValuesIndex]
|
||||
if comp.AxisValuesIndex < len(varc.AxisValuesList.VarIndices.mapping):
|
||||
varIdx = varc.AxisValuesList.VarIndices.mapping[comp.AxisValuesIndex]
|
||||
if varIdx != NO_VARIATION_INDEX:
|
||||
axisValues = (
|
||||
axisValues + instancer[varIdx]
|
||||
|
Loading…
x
Reference in New Issue
Block a user