You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is redundant, and I believe it's because in otData.py the VarStore is not defined as a format-switching table (there's in fact only one format right now). Changing it like that makes the redundant Format element go away, only the Format attribute stays:
Another way to fix it would be to specialise the toXML method of FormatSwitchingBaseTable, right now it uses BaseTable.toXML, which in turns has special handling of Format attribute (arguably that belongs to FormatSwitching variant only):
I just noticed that when dumping an ItemVariationStore to ttx, the default Format=1 is written both in an attribute as well as as a sub-element:
fonttools/Tests/varLib/data/test_results/TestVariableCOLR-VF.ttx
Lines 185 to 186 in 9824263
This is redundant, and I believe it's because in otData.py the VarStore is not defined as a format-switching table (there's in fact only one format right now). Changing it like that makes the redundant Format element go away, only the Format attribute stays:
But then a bunch of other tests fail when they import from existing XML files that do still contain a Format element, with KeyError like so:
Another way to fix it would be to specialise the
toXML
method of FormatSwitchingBaseTable, right now it uses BaseTable.toXML, which in turns has special handling of Format attribute (arguably that belongs to FormatSwitching variant only):fonttools/Lib/fontTools/ttLib/tables/otBase.py
Lines 1117 to 1122 in 9824263
Maybe there's no easy way to make this change backward compatible and we'll have to live with this duplication..
The text was updated successfully, but these errors were encountered: