wordpress-mobile / gutenberg-mobile

Mobile version of Gutenberg - native iOS and Android
GNU General Public License v2.0
233 stars 54 forks source link

Improve base typographic rhythm #550

Open iamthomasbishop opened 5 years ago

iamthomasbishop commented 5 years ago

When doing some investigation during some recent Headings font work, I noticed that our base typographic rhythm is a bit cramped. I compared against the following:

For a visual reference, set on a canvas width of 375:

image

~I'm tempted to defer to what Reader web/mobile has in terms of line-height, but considering the base font-size is 16 in our case, the 1.5 line-height ends up being a nice round 24pt, which aligns really well with our 16pt grid and our Block top/bottom margins (12pt).~

Update: To align with Reader (web/mobile) and iOS Reader Mode, as well as a slightly more breathable line-height, the new spec should be:

This should also allow for a nice rhythm agnostic to font-size (think dynamic type).

Punch List

Bonus points if we can set up a nice type system that scales well with Lists, Quotes, etc. when we get to those blocks.

kjellr commented 5 years ago

My general rule of line height: pick what seems to be just comfortable enough, and add a point. πŸ™‚

16 / 1.5 seems a bit too tight to me, andΒ I agree that 1.8 might be too much here. Can we try working out a nice round number closer to 1.6?

iamthomasbishop commented 5 years ago

My general rule of line height: pick what seems to be just comfortable enough, and add a point.

That's a nice rule πŸ˜„ While I was hoping to come up "one standard to rule them all", I'm not sure that "because it aligns to our 8/24 grid" is good enough reason to stick to that pipe dream – especially considering dynamic type sizes on iOS/Android and such.

1.6 does feel pretty good, even if it's not exactly on the 8pt grid. Considering this ratio is also in-line with what we're doing on Reader – and upon reviewing what Apple does for iOS "Reader Mode" (also 1.6 ratio) – I'm going to adjust the proposal to 1.6.

Thanks for the feedback/insight! I think this is also something that we should feel comfortable pushing upstream to Core. // cc @jasmussen

iamthomasbishop commented 5 years ago

Updated spec, per discussion:

Preview for visibility:

image

Going to update the original post.

jasmussen commented 5 years ago

Created https://github.com/WordPress/gutenberg/pull/13765, let me know if I got that right!

SergioEstevao commented 4 years ago

@iamthomasbishop is this still a thing we want to do?

iamthomasbishop commented 4 years ago

@SergioEstevao Yes, I would still like to do this β€” it will help a lot with readability and consistency.

hypest commented 4 years ago

Will have a look during this HACK week.

iamthomasbishop commented 4 years ago

I just wanted to note that we are considering a switch to using the system-default New York serif on iOS (the "new" default serif font as of iOS 12). No change on Android, as Noto Serif is already the system-default serif font.

I recently documented the block contents type scale and the "neutral" type scale for UI typography that we might also want to look into while investigating typography. Obviously this hasn't been updated for to account for the upcoming iOS change but might help as a reference for the time being.