Skip to content
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

varLib.instancer --update-name-table not updating nameID 25 with Roman/italic #2336

Open
RosaWagner opened this issue Jun 9, 2021 · 8 comments

Comments

@RosaWagner
Copy link

RosaWagner commented Jun 9, 2021

When separating italic and roman, nameID25 remains FontName instead of FontNameRoman / FontNameItalic. Although opinion are differing if it should be done by default or not. Since it is required on GF end for new VF, it may be implemented as an option?

@RosaWagner
Copy link
Author

RosaWagner commented Jun 10, 2021

I report here the discussion from the chat:

Rosa: We have more and more fonts which gather the Roman and Italic in the same source file, and they need to be separated in 2 variable fonts before getting onboarded (without duplicating sources would be the best). We have been using the fabulous varLib.instancer, but it doesn't get the name ID25 as the builder does. The question is: shall fonttools fix the name tables, or should we make a post-process script, or can it be integrated to the builder in some way?

Dave: it should be done in fonttools… what are the differing opinions?

Rosa: googlefonts/gftools#297

@tphinney
Copy link

tphinney commented Jun 10, 2021

Agree on the FontTools part. Hoping the solution will deal with a Slant axis as well as an Italic axis.

@RosaWagner
Copy link
Author

AH GF eng said they would handle the slant axis as any other axes (not like weight and italic)

@m4rc1e
Copy link
Contributor

m4rc1e commented Jun 12, 2021

Apologies for my late response. I had forgotten why we never updated this record but it occurred to me last night why. In the MS spec, it says:

If present in a variable font, it may be used as the family prefix in the PostScript Name Generation for Variation Fonts algorithm.

https://docs.microsoft.com/en-us/typography/opentype/spec/name#name-ids

Both myself and Cosimo believe that this name record is only used for the purpose mentioned above. Currently at Google Fonts, we believe that nameID 25 needs to be unique for each font which makes up a VF family e.g for a family which consists of a Roman and an Italic font, we would expect the following for nameID 25:

Roman VF: FamilyNameRoman
Italic VF: FamilyNameItalic

Unfortunately, the above records will generate horrible postscript names when using the Adobe PS Name Generation heuristic which we do use e.g:

Instantiated Roman postscript name: FamilyNameRoman-Roman
Instantiated Italic postscript nane: FamilyNameItalic-Italic

If we don't update name record 25 which is the current behaviour, we get:

Roman VF postscript name: FamilyName-Roman
Italic VF postscript name: FamilyName-Italic

I hope the above makes sense. More than happy to explain further.

@khaledhosny
Copy link
Collaborator

khaledhosny commented Jun 12, 2021

The requirement for unique prefix is a workaround for an Adobe CC bug. I don’t think it is appropriate to hard-code such work arounds in FontTools. If GF need this work around, it should be in a GF-specific tool.

@davelab6
Copy link
Contributor

davelab6 commented Jun 12, 2021 via email

@davelab6 davelab6 assigned punchcutter and unassigned punchcutter Jun 13, 2021
@davelab6
Copy link
Contributor

Here's a reference from @punchcutter at
googlefonts/gftools#297 (comment) regarding it's status as a bug, thanks Khaled :)

@behdad
Copy link
Member

behdad commented Jun 14, 2021

Some things never change...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants