-
-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Named instances revisited #83
Comments
Wow, yeah that's super weird. |
Honestly, this looks like an error in GRADUATE.ttf (incorrect)
SourceCodeVariable-Roman.ttf (correct)
Inconsolata[wdth,wght].ttf (incorrect)
Recursive (correct)
Ancho (incorrect)
(spacing in those strings are getting tackled in #74) |
@raphlinus do you know which tool in the Inconsolata build chain is responsible for the fvar table? |
@Pomax fascinating! The source for that is https://github.com/googlefonts/Inconsolata/blob/master/sources/build.sh , which generally I didn't touch, it's adapted from the Google Fonts standard build scripts (@m4rc1e I think is the main author and will be very interested in tracking this down). The main tool is the fontmake invocation on line 24, but there are also a lot of "gftools" passes that do various things. Obviously the thing to do is examine the intermediate stages of that build chain and see where the error pops up. |
Oh nice, thanks for the explanation! I guess it might also be time to summon a wild @davelab6, to see if he knows how to effectively test the g-side of things =P |
The author of Ancho reports they used Glyphs so I'll drop them a line to see if they have a bug in their InstanceRecord code (or, build on top of open source that might?) |
If I ttx the nametable for Inconsolata on google/fonts, I don't get this issue. @Pomax, can you point me to the Inconsolata ttf you used? |
I used the one from https://github.com/googlefonts/Inconsolata/tree/master/fonts/variable, but if you're seeing it do the right thing, then I guess it's dissection time for the code that parses, and links, strings. The parsing code for instance records is:
checking this against https://docs.microsoft.com/en-us/typography/opentype/spec/fvar#instancerecord, the
But it does not see Inconsolata as having postscript names:
Looking back at the spec, the field'd description lists it as optional, with the text under it also saying it should be included, so that's probably why things went wrong here:
The code is not checking the record size to determine whether to include the postscriptname, so this is definitely a bug to be fixed in this code, rather than a bug in any other software. Thanks for the reality check, @m4rc1e! |
(filed MicrosoftDocs/typography-issues#613 to hopefully get the spec text updated to something clearer here) |
Fix landed in 552bbf7 with the following code:
Yielding the following output for Inconsolata:
|
I enjoyed this font sleuthing, thanks for the explanation, @Pomax! |
Thanks @Pomax for the fix in #78 and the extensive explanation!
I see that the postscriptname ID's are off by one, though:
You see they are one ahead of the subfamily name. For the last instance, it maps to the first entry in the name table ("GRADUATE").
Based on your explanation and reading the spec, I looks to me that the
InstanceRecord
is defined properly. So I'm curious as where this is happening.(This is not very urgent to me, as I don't expose postscript names in WF!)
The text was updated successfully, but these errors were encountered: