This script only works with the axis name “Weight” for me. All other names produce the following error:‘tag’
Traceback (most recent call last):
File "Variable Font Test HTML.py", line 1200
variableFontInfo = otVarInfoForFont(thisFont)
File "Variable Font Test HTML.py", line 1140, in otVarInfoForFont
otVarSliders = allOTVarSliders(thisFont)
File "Variable Font Test HTML.py", line 434, in allOTVarSliders
tag = axisDict[axis]["tag"]
KeyError: 'tag'
I’m seeing a similar thing for a custom axis in Glyphs 3525.:
'MSHQ'
Traceback (most recent call last):
File "Variable Font Test HTML.py", line 1319
variableFontInfos.append(otVarInfoForFont(thisFont))
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "Variable Font Test HTML.py", line 1250, in otVarInfoForFont
styleMenu = listOfAllStyles(thisFont)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "Variable Font Test HTML.py", line 1221, in listOfAllStyles
axisValue = coords[axisTag]
~~~~~~^^^^^^^^^
KeyError: 'MSHQ'
Had previously worked when the only axis was Weight. If I delete the axis (but not the Virtual Master parameter) I see the same error as above, and when I then remove the VM parameter it works again.
The problem was that the Axis location parameters in the masters and instances didn’t have a value set for the Virtual masters. And the script depended on this.