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

[opentype/name/match_familyname_fullfont] Unclear rationale, unsure whether fail is warranted #4995

Open
arrowtype opened this issue Feb 13, 2025 · 0 comments

Comments

@arrowtype
Copy link
Contributor

Observed behaviour

I’m building binary fonts directly from UFO sources, using FontMake.

As part of this, ufo2ft will construct NameID 4 from the same UFO info fields that are used to set up NameIDs 16 & 17.

https://github.com/googlefonts/ufo2ft/blob/5a606b7884bb6da594e3cc56a169e5c3d5fa267c/Lib/ufo2ft/outlineCompiler.py#L402-L435

The problem is, there is a Font Bakery check which will yield a FAIL if NameID 4 doesn’t start with NameID 1: match_familyname_fullfont.

However, the rationale of this check is slightly ambiguous. Can NameID 4 start with any of the three listed names, or only NameID 1?

  • Based on the rationale, I would guess the first thing is true (NameID 4 can start with NameID 1, 16, or 22), but...
  • Based on the check results, it seems that the much stricter match is true (NameID 4 must start with exactly NameID 1)

The FULL_FONT_NAME entry in the ‘name’ table should start with the same string as the Family Name (FONT_FAMILY_NAME, TYPOGRAPHIC_FAMILY_NAME or WWS_FAMILY_NAME).

If the Family Name is not included as the first part of the Full Font Name, and the user embeds the font in a document using a Microsoft Office app, the app will fail to render the font when it opens the document again.

Is it known which scenario is true?

Related issues:

Expected behaviour

I would expect one of the following:

  • If NameID 4 can start with NameID 1, 16, or 22, then ufo2ft is working well, and this check should be made less strict.
  • If NameID 4 must start with exactly NameID 1, then ufo2ft should be adjusted to set NameID 4 based on the styleMap names (Names 1 & 2), instead of the preferred typographic names (Names 16 & 17).

Resources and steps needed to reproduce

I can’t share the fonts publicly, but I can share them directly via email, if a reproduction case is necessary.

Thank you!

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

No branches or pull requests

1 participant