Open lemzwerg opened 7 years ago
Hmmm, I see. With non-variable fonts, we omit name id 16 if it would be the same as name id 1, assuming that code falls back to name id 1 when name id 16 is not present. With variable fonts name id 1 makes little or no sense, so it's unsurprising the spec makes no mention of it.
Actually, in my forthcoming FreeType implementation I do fall back to id 1 if there is neither id 25 nor id 16 – this is for creating PS names for GX fonts that predate the OpenType standard.
Checked NotoSansArabic-VF.ttf as a sample and it does not contains either id 16 or id 25 in name table.
According to the TechNote 5902, the Variations PostScript Name Prefix string is used to avoid ambiguity.
My idea is to generate ID 25 from ID 16, by a mapping non-ascii char with 2 or more ascii characters. “André Var” => Andr0eVar “Andró Var” => Andr0oVar
é maps to 0e ó maps to 0o 0 maps to 00
here 0 behaves like escape character.
However, I didn't get an idea on how to generate ID 25 when ID 16 is also absent.
I suggest we don't do anything for a while.
To make Adobe TechNote 5902 (for generating PS names for font instances) work properly, ID 25 entries in the
name
table (Variations PostScript Name Prefix) should be added to all VF files. The algorithm specifies that ID 16 entries should be used if ID 25 is missing, however, there are no ID 16 entries either...