[VARC] Use a DeltaSetIndexMap
This commit is contained in:
parent
d37b3942ee
commit
58bb96be91
@ -3392,11 +3392,7 @@ otData = [
|
|||||||
(
|
(
|
||||||
"AxisValuesList",
|
"AxisValuesList",
|
||||||
[
|
[
|
||||||
# A hack here would be to encode the VarIndex as the first member
|
("LOffsetTo(DeltaSetIndexMap)", "VarIndices", None, None, ""),
|
||||||
# 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, ""),
|
|
||||||
("TupleList", "Item", "", 0, ""),
|
("TupleList", "Item", "", 0, ""),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -306,8 +306,8 @@ class _TTGlyphVARC(_TTGlyph):
|
|||||||
axisValues = Vector(varc.AxisValuesList.Item[comp.AxisValuesIndex])
|
axisValues = Vector(varc.AxisValuesList.Item[comp.AxisValuesIndex])
|
||||||
# Apply variations
|
# Apply variations
|
||||||
varIdx = NO_VARIATION_INDEX
|
varIdx = NO_VARIATION_INDEX
|
||||||
if comp.AxisValuesIndex < varc.AxisValuesList.VarIndicesCount:
|
if comp.AxisValuesIndex < len(varc.AxisValuesList.VarIndices.mapping):
|
||||||
varIdx = varc.AxisValuesList.VarIndices[comp.AxisValuesIndex]
|
varIdx = varc.AxisValuesList.VarIndices.mapping[comp.AxisValuesIndex]
|
||||||
if varIdx != NO_VARIATION_INDEX:
|
if varIdx != NO_VARIATION_INDEX:
|
||||||
axisValues = (
|
axisValues = (
|
||||||
axisValues + instancer[varIdx]
|
axisValues + instancer[varIdx]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user