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

Correct family and style data in name table. #51

Merged
merged 3 commits into from
Jun 22, 2015
Merged

Conversation

jamesgk
Copy link
Contributor

@jamesgk jamesgk commented Jun 10, 2015

This uncomments some code which distinguishes between Regular/Bold and other weights when setting the UFOs' styleMapFamilyName attribute, which is used by the FDK to set the output OTFs' family names (this association is documented here: http://unifiedfontobject.org/versions/ufo2/fontinfo.html). It's not clear why this code was commented out in the first place.

Part of #37

This uncomments some code which distinguishes between Regular/Bold and other
weights when setting the UFOs' styleMapFamilyName attribute, which is used by
the FDK to set the output OTFs' family names (this association is documented
here: http://unifiedfontobject.org/versions/ufo2/fontinfo.html). It's not clear
why this code was commented out in the first place.

Part of #37
@jamesgk
Copy link
Contributor Author

jamesgk commented Jun 10, 2015

cc @roozbehp

@behdad
Copy link
Contributor

behdad commented Jun 12, 2015

Looks about right, but I have no idea why this wasn't done before. So, please merge if you know what you are doing, or get @roozbehp's feedback.

James Godfrey-Kittle added 2 commits June 22, 2015 12:34
This propagates to name ID 6 in the name table, and font name info in the
CFF table.
Without this, ufo2fdk sets both Light and Regular to 400 by default.
@jamesgk
Copy link
Contributor Author

jamesgk commented Jun 22, 2015

This should be fixed, finally, but what still seemed odd to me was that the weight class for Thin is set to 250 (when I would have expected 100) in instanceNames.py. The binaries at https://github.com/google/fonts/tree/master/apache/roboto also use 250.

So when you have the font locally and it's used to render text in a browser, font-weight: 100 applied to that text will use Roboto Light instead of Thin. Presumably this is not an issue when you're using Roboto as a web font, and perhaps the local use is an edge case. Still, is there any reason why we'd want the weight class to be 250?

@behdad
Copy link
Contributor

behdad commented Jun 22, 2015

The 250 is a historical artefact. Windows automatically emboldens fonts with declared weight lower than 250, so for fonts designed to be used on Windows, people typically set the weight to 250 for anything lighter than that.

cc @roozbehp @jungshik

@jamesgk
Copy link
Contributor Author

jamesgk commented Jun 22, 2015

Alright, so I will leave it alone for now and we can re-open this if needed.

jamesgk added a commit that referenced this pull request Jun 22, 2015
Correct metadata related to font names and weights.
@jamesgk jamesgk merged commit f8d8004 into master Jun 22, 2015
@jamesgk jamesgk deleted the name-table-fix branch October 24, 2016 23:22
@mikmikmik
Copy link

mikmikmik commented Mar 6, 2017

Hey there @jamesgk @behdad @roozbehp @jungshik
I love this font and use it locally on Linux but there's an issue with the Thin weight in inkscape and Font Manager. In inkscape I cannot view the Thin when the Light is activated, it's not even in the menu. It's partly due to a way Inkscape consider it has the "same CSS value" and so already added as Light. The issue is listed here : https://bugs.launchpad.net/inkscape/+bug/1555109 but still a user should have the weight the font is named after, it's a bit misleading if we think we download a font with a weight of 100 which is in reality a 250. In Font Manager I see it in the list but when I select it, it shows as Light. I actually tried before posting this to modify the weight class to 100 in FontForge and it's working well now. I'll have to ship the modified font with the document though. Thanks for you nice work.

@jungshik
Copy link
Contributor

jungshik commented Mar 6, 2017

@mikmikmik Thank you for the feedback. I always argued for using fsWeight = 100 for Noto. If necessary, we can have a special Windows binary with fsWeight=250. Android, Linux and Mac do not care. See #179.

@davelab6
Copy link
Member

davelab6 commented Mar 7, 2017 via email

@mikmikmik
Copy link

Microsoft actually set Thin to 100 too :
https://www.microsoft.com/typography/otspec/os2.htm#wtc
Mozilla too, based on the CSS norm :
https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight
Inkscape is based on the SVG norm (same as CSS for fonts) so Inkscape users (Windows too) won't be able to use these fonts properly.

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.

None yet

5 participants