Not sure what to do about failing "com.adobe.fonts/check/varfont/valid_default_instance_nameids"
See original GitHub issueObserved behaviour
I have a font building from FontMake, and it has a fairly normal designspace.
The default instance is “Light,” and the name IDs are as follows:
nameID=1
Shantell Sans LightnameID=2
RegularnameID=3
1.005;@;ShantellSans-LightnameID=4
Shantell Sans LightnameID=5
Version 1.005;[1aad51c31]nameID=6
ShantellSans-LightnameID=8
Arrow TypenameID=9
Stephen Nixon, Anya Danilova, Shantell MartinnameID=11
https://arrowtype.comnameID=12
https://github.com/arrowtype/shantell-sansnameID=13
This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is available with a FAQ at: https://scripts.sil.org/OFLnameID=14
https://scripts.sil.org/OFLnameID=16
Shantell SansnameID=17
Light
I think this is all correct… however, I get the following fail:
com.adobe.fonts/check/varfont/valid_default_instance_nameids
Validates that when an instance record is included for the default instance, its subfamilyNameID value is set to either 2 or 17 (or something with the same value as 2), and its postScriptNameID value is set to 6 (or something with the same value as 6).
with fonts/shantell_sans-for-googlefonts/ShantellSans[BNCE,IRGL,TRAK,wght].ttf
Rationale:
According to the 'fvar' documentation in OpenType spec v1.9.1
https://docs.microsoft.com/en-us/typography/opentype/spec/fvar
The default instance of a font is that instance for which the coordinate
value of each axis is the defaultValue specified in the corresponding
variation axis record. An instance record is not required for the default
instance, though an instance record can be provided. When enumerating
named instances, the default instance should be enumerated even if there
is no corresponding instance record. If an instance record is included
for the default instance (that is, an instance record has coordinates set
to default values), then the nameID value should be set to either 2 or 17
or to a name ID with the same value as name ID 2. Also, if a
postScriptNameID is included in instance records, and the
postScriptNameID value should be set to 6 or to a name ID with the same
value as name ID 6.
FAIL 'Light' instance has the same coordinates as the
default instance; its subfamily name should be 'Regular' [code:
invalid-default-instance-subfamily-nameid:344]
Result: FAIL
Expected behaviour
The check message is somewhat confusing, and it took some digging around github and some experimentation with TTX to pass the check, before I understood what it was actually saying.
From my experimentation, I found that:
- The default instance and its expected names (for the check) is determined in
fvar
, where the name IDssubfamilyNameID="265"
(Light) andpostscriptNameID="320"
(ShantellSans-Light) are referenced. - If I change name ID 1 to
Shantell Sans
and name ID 2 toLight
, I pass the check. - Therefore, the check is basically saying that name ID 2 should be
Light
rather thanRegular
, which implies that name ID 1 should simply be the family name.
However, based on some GH issues, it seems that perhaps the check is outdated/incorrect/overly-strict:
My main question
Who is more correct – FontMake, or @miguelsousa?
Is it a matter of opinion, or is there anything that explains why FontMake makes names 1 and 2 in the way it does?
If it is a matter of opinion, can Google Fonts coordinate the expectations between FontMake and FontBakery?
If we do keep the check…
I only vaguely understood what the rationale is telling me, and I don’t understand much at all what action it is suggesting that I take. I understand that writing a clear check rationale is tricky, as readers have such a wide range of technical understanding.
However, I think ideally, the fail messages would explain:
- What specific name ID(s) are incorrect
- What specific name ID(s) should be changed, and to what.
- Is it suggesting that name ID 2 should be
Light
? If so, should I edit this - If it is not suggesting I change a name ID, what is it suggesting? Is it saying that I should make the default instance a “Regular” (which would require adding one or more sources/masters to the font)?
- Is it suggesting that name ID 2 should be
- If there is something that can be set in a designspace file to produce the desired result from a FontMake build, what is recommend?
Resources and exact process needed to replicate
There is some additional discussion of this at https://github.com/googlefonts/fontbakery/issues/3708.
My current fonts (with the fail
ing name ID 2) can be found here: https://github.com/arrowtype/shantell-sans/tree/93c00e0d3aaa6e8ea58c09f863791651ae04277a/fonts/shantell_sans-for-googlefonts
Thanks so much for any insights on how I should proceed!
Issue Analytics
- State:
- Created a year ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
Heyyyyy! Things are looking good when I check with that branch.
@arrowtype #3896 should fix this issue. Please check if you have a chance.