I am currently testing the opentype code in my font. An issue I have recently encountered is that the text for c16’s options have been partially replaced by those of cv20 in certain applications when using the exported font.
cv16 is used to modify the look of the invisible braille dots, while cv20 has been set up as a opentype test using a few of the dingbats that has been drawn.
For some reason the text of the options in cv16 that should say Small, Ring, Numeral and Line has been replaced by the corresponding first four text strings from cv20.
This is an issue with the Affinity app. Glyphs writes the names correctly to the name table of the OpenType file and uses those names only for the intended features and lookups.
One clue might be that the Affinity app incorrectly uses the names in order of the name table and not in the order that they are assigned in the GSUB table. In the name table, the names appear in the order Variants of Raised Braille Text, Blank, Small, Ring, Numeral, Line, Variants of Lowered Braille, Filled, Variants of cross, Celtic, White, Heavy, Orthodox, Lorraine, Shadowed White. That matches the order in the UI.
So, the Affinity app addresses the names not by ID but by name index, therefore the app is making an incorrect assumption that the cv## feature names are written in a specific way in the name table. The app should be using name IDs, not name indices.
Sharing names between CV features is a dangerous thing But I don’t think it’s your fault, maybe the exported name table actually shares the name IDs between different features. That won’t work, because the CV feature only stores the first name ID and the number of glyph variants that follow, each with its own name.
So if two CVs partially have the same names, but a different number of variants, that will probably go wrong. But it’s a problem of how those names are stored in the name table, not a problem in user input.
Could you send me your glyphs file and font, so I can see if my suspicion is correct?
A tool parsing the font has only the first name ID (FirstParamUILabelNameID, e.g. 303) and the number of following entries (NumNamedParameters, e.g. 5) to go on. But for CV16, there is only one entry for named parameters, before the names for the next CV feature start.
So Affinity keeps reading and uses “Variants of cross” etc. as the names for CV16.
Affinity is not at fault, it is a bug in the way the name table is built by Glyphs.
How did I guess? I’ve written a script to add CV names to a finished font and have experienced similar problems