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

Use ex unit for measure values #2960

Closed
thisisdano opened this issue Mar 15, 2019 · 1 comment
Closed

Use ex unit for measure values #2960

thisisdano opened this issue Mar 15, 2019 · 1 comment
Assignees
Labels
Type: Enhancement An improvement to existing code

Comments

@thisisdano
Copy link
Member

thisisdano commented Mar 15, 2019

I'm finding that the ch unit is a poor unit for doing our measure calculation, since the 0 character on which it's based has significant variance from font to font. Since we're already normalizing our font size in such a way that fonts display with a similar x-height at each grade in our font-size system, we should use the ex unit for a more consistent and reliable output. The ex unit has universal support.

This is also distorting our measure output tokens in the direction of being generally too wide — far outside the 50-75 target character count in our guidance. That said, the guidance is maybe a little bit skewed narrow, as a popular readable site like medium.com has a line length of around 75-78 characters, and we could a bit longer than that for something like a small caption.

I'm also proposing that we add an additional token to accommodate some of gamut we'll lose by concentrating our coverage on the guidance range.

token desired output proposed value current value current output in Public Sans
1 ~50 characters 44ex 40ch 51 characters
2 ~66 characters 60ex 60ch 80 characters
3 ~72 characters 64ex 66ch 88 characters
4 ~78 characters 68ex 72ch 95 characters
5 ~86 characters 74ex 77ch 100 characters
6 ~96 characters 88ex
Beta 6 Beta 7
'1' '1'
'2' '4'
'3' '5'
'4' '6'
'5' '6'
@thisisdano thisisdano added Type: Enhancement An improvement to existing code 2.0 labels Mar 15, 2019
@thisisdano thisisdano self-assigned this Mar 15, 2019
@maya
Copy link
Contributor

maya commented Mar 18, 2019

Done in #2964.

@maya maya closed this as completed Mar 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement An improvement to existing code
Projects
None yet
Development

No branches or pull requests

2 participants