[varLib/avar2] Omit identity VarIdx map

This commit is contained in:
Behdad Esfahbod 2023-05-30 13:18:17 -06:00
parent d915f08e76
commit a08acf41f8
2 changed files with 2 additions and 4 deletions

View File

@ -264,6 +264,8 @@ def _add_avar(font, axes, mappings, axisTags):
varIdxMap = ot.DeltaSetIndexMap()
varIdxMap.mapping = [varIdxes[t] for t in axisTags]
varIdxMap.Format = 1 if len(varIdxMap.mapping) > 0xFFFF else 0
if all(i == v for i, v in enumerate(varIdxMap.mapping)):
varIdxMap = None
avar.majorVersion = 2
avar.table = ot.avar()

View File

@ -14,10 +14,6 @@
<mapping from="0.8" to="0.79"/>
<mapping from="1.0" to="1.0"/>
</segment>
<VarIdxMap Format="0">
<!-- Omitted values default to 0xFFFF/0xFFFF (no variations) -->
<Map index="0" outer="0" inner="0"/>
</VarIdxMap>
<VarStore Format="1">
<Format value="1"/>
<VarRegionList>