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

Don't store Regular in name id 4 #337

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

mhosken
Copy link

@mhosken mhosken commented Jul 12, 2019

Name id 4 may or may not take the word Regular as part of the full family name, but in the past all fonts removed the Regular and many systems presume that. This PR simply doesn't add the Regular to the full family name if it is the word "regular" (when lowercased).

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@mhosken
Copy link
Author

mhosken commented Jul 12, 2019

Feel free to apply the patch yourself rather than going through a CLA process.

@mhosken
Copy link
Author

mhosken commented Jul 12, 2019

I signed it!

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@bobh0303
Copy link

bobh0303 commented Aug 6, 2019

How soon might we expect this to be merged?

@anthrotype
Copy link
Member

Hey, sorry I forgot about this (I probably was away when this was first filed then never caught up with the backlog).

So. I understand where you're coming from, although I would prefer not to change the default behavior now, because this has been like that since the beginning and many fonts out there rely on this default behavior. It is also the default behavior of Glyphs.app, by the way.

Unfortunately the UFO spec doesn't have a specific attribute for setting full name (it simply says it can be derived from preferred family and subfamily). But you should be able to explicitly set the desired name string using the generic openTypeNameRecords field in fontinfo.plist: http://unifiedfontobject.org/versions/ufo3/fontinfo.plist/

This is a plist array of dicts, each defining a name record with its nameID, encodings and string.

Or you can patch the font after compilation to strip the "Regular" substring.

@anthrotype
Copy link
Member

I just checked and also Robofont always adds "Regular" in Full Name nameID 4

@bobh0303
Copy link

Can you explain how "fonts rely on this default behavior"?

@anthrotype
Copy link
Member

I simply meant that, if somebody used ufo2ft to build a font without explicitly overriding openTypeNameRecords in fontinfo.plist (~99% of the times), and they were happy with the default FullName strings generated, if we were to change the default value for nameID=4 to no longer include "Regular" in its string, then they would get a sudden change in their font's name table as they rebuild the font with an updated ufo2ft.

Base automatically changed from master to main March 1, 2021 09:01
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

Successfully merging this pull request may close these issues.

4 participants