Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Hairline modifications for web fonts use #13

Closed
3 tasks done
davelab6 opened this issue Jul 6, 2015 · 7 comments
Closed
3 tasks done

Hairline modifications for web fonts use #13

davelab6 opened this issue Jul 6, 2015 · 7 comments

Comments

@davelab6
Copy link

davelab6 commented Jul 6, 2015

CSSv2/v3 can only handle 9 weights per family, so I think WorkSans-Hairline.ttf needs some changes, which I've made at google/fonts@00fefdc

  • a usWeightClass of 400
  • rename name table id 6 from WorkSans-Hairline to WorkSansHairline-Regular
  • remove name tables 16 and 17
@weiweihuanghuang
Copy link
Owner

Would it be better to make it the mininum class 100, but as a "Work Sans Hairline"

@davelab6
Copy link
Author

davelab6 commented Jul 7, 2015

CSS can only have weights in 100s, 1-9, but Windows GDI auto-bolds anything with a weight of 249 or less, so the minimum you should use is 250.

@weiweihuanghuang
Copy link
Owner

If its a problem that Windows GDI auto-bolds anything < 250, are the weights at 100, 200 okay for 'Work Sans' family?

@weiweihuanghuang
Copy link
Owner

About to update my repo to match the google/fonts@00fefdc

Including adding Panose

Only difference is yours:

    <namerecord nameID="3" platformID="3" platEncID="1" langID="0x409">
      1.030;UKWN;WorkSans-Hairline

Mine

    <namerecord nameID="3" platformID="3" platEncID="1" langID="0x409">
      1.031;UKWN;WorkSansHairline-Regular

@davelab6
Copy link
Author

davelab6 commented Jul 8, 2015

If its a problem that Windows GDI auto-bolds anything < 250, are the weights at 100, 200 okay for 'Work Sans' family?

Ah, no. I suggest flooring the family at 250, eg the Hairline has that value, and incrementing the other very light weights above it. Eg,

$ grep usWeightClass *ttx ;
WorkSans-Black.ttx:    <usWeightClass value="900"/>
WorkSans-Bold.ttx:    <usWeightClass value="700"/>
WorkSans-ExtraBold.ttx:    <usWeightClass value="800"/>
WorkSans-ExtraLight.ttx:    <usWeightClass value="200"/> <-- change to 280
WorkSans-Hairline.ttx:    <usWeightClass value="50"/> <-- change to 250
WorkSans-Light.ttx:    <usWeightClass value="300"/>
WorkSans-Medium.ttx:    <usWeightClass value="500"/>
WorkSans-Regular.ttx:    <usWeightClass value="400"/>
WorkSans-SemiBold.ttx:    <usWeightClass value="600"/>
WorkSans-Thin.ttx:    <usWeightClass value="100"/> <-- change to 260
$

@twardoch might have a view on this as the same issue came up with the latest versinon of Fira.

Only difference is yours:

I think the PS Name is a bit arbitrary and your version will work fine; I updated the version to append a g so we can tell its a gf version. Edit: Ah, I see you went with my version. I think its clearer this way :) https://github.com/weiweihuanghuang/Work-Sans/releases/tag/v1.31 Thanks!

@tphinney
Copy link

tphinney commented Jul 9, 2015

Yes, floor it at 250. Leave the "light" at 300 if you have one, and then space the intermediate weights from 250 up. It sucks, but this is the safest way to ensure nothing bad will happen on Windows in GDI apps.

This issue has been ongoing for at least 15 years now.

Note that it is in fact possible to write Windows GDI apps that won't do this, and only about half of them do. The problem is a combination of GDI behaviors for faux font weights, plus lack of understanding from programmers about the potential for a problem, as the majority of common typefaces would never have this issue—plus, we font developers keep on avoiding the issue on our side.

weiweihuanghuang pushed a commit that referenced this issue Jul 12, 2015
- Changed usWeightClass to start at 250 by changing Thin, ExtraLight (in TTF) and Hairline (in OTF) as per #13 (comment)
- Changed mid stroke of /S in Black master to balance counters
- Added comments to hinting .ctrl files
@weiweihuanghuang
Copy link
Owner

Thanks for the advice, I've implemented the changes

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

No branches or pull requests

3 participants