Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#30195 closed enhancement (fixed)

Twenty Fifteen: font kerning everywhere

Reported by: afercia's profile afercia Owned by: iandstewart's profile iandstewart
Milestone: 4.1 Priority: normal
Severity: normal Version: 4.1
Component: Bundled Theme Keywords: has-patch commit
Focuses: Cc:

Description

Twenty Fifteen comes with a beautiful typography and Noto Serif does contain information on kerning pairs.
Let's consider to enable font kerning wherever possible in a safe, standardized way (no text-rendering: optimizeLegibility;).

Chrome on Windows:
https://cldup.com/xHEYBe9SwI.gif

For reference:

Advanced web typography: Kerning
Posted on 08 April 2014
http://www.elliotjaystocks.com/blog/kerning/

Browser support:
https://developer.mozilla.org/en-US/docs/Web/CSS/font-feature-settings#Browser_compatibility

Attachments (3)

30195.patch (461 bytes) - added by afercia 10 years ago.
30195.1.diff (456 bytes) - added by iamtakashi 10 years ago.
Remove font kerning because it crushes Chrome.
30195.just-for-testing.patch (1.5 KB) - added by afercia 10 years ago.
do not commit, just for testing purposes

Download all attachments as: .zip

Change History (19)

@afercia
10 years ago

#1 @afercia
10 years ago

  • Keywords has-patch added

#2 follow-up: @iamtakashi
10 years ago

Nice! It does make it a lot better. I'd like try this out and see if any issue comes up in the beta phase.

Last edited 10 years ago by iamtakashi (previous) (diff)

#3 in reply to: ↑ 2 ; follow-up: @afercia
10 years ago

Replying to iamtakashi:

Nice! I does make it a lot better. I'd like try this out and see if any issue comes up in the beta phase.

Yup, I'm curious especially about mobile devices, If there are any performance issues, the kerning could be limited to just headings. Seen on Typekit blog where they apply kernel just to paragraphs and lists.

#4 @helen
10 years ago

  • Milestone changed from Awaiting Review to 4.0.1

#5 @SergeyBiryukov
10 years ago

  • Milestone changed from 4.0.1 to 4.1

#6 @iandstewart
10 years ago

  • Keywords commit added

Cool. @josephscott is doing some performance testing. It'll be a neat test.

#7 in reply to: ↑ 3 @josephscott
10 years ago

Replying to afercia:

Yup, I'm curious especially about mobile devices, If there are any performance issues, the kerning could be limited to just headings. Seen on Typekit blog where they apply kernel just to paragraphs and lists.

Unless implementing the kerning is particularly CPU intensive ( my guess is it isn't, but I don't have data to back that up ) I don't think this will have much impact on mobile performance. I expect for devices using a mobile connection downloading ~45KB of font files from Google is going to be a bigger impact that a CSS kerning option.

#8 @iandstewart
10 years ago

  • Owner set to iandstewart
  • Resolution set to fixed
  • Status changed from new to closed

In 30217:

Twenty Fifteen: kern everything -- it reads better.

Props afercia, fixes #30195.

#9 @ocean90
10 years ago

  • Keywords commit removed
  • Resolution fixed deleted
  • Status changed from closed to reopened

[30217] is producing a BSOD in Chrome 38.0.2125.111 on OS X 10.10. Also confirmed by tywayne, see https://wordpress.slack.com/archives/core-themes/p1415054055000717. But only when the admin bar is visible.

Re-opening for some investigations.

Last edited 10 years ago by ocean90 (previous) (diff)

#10 @iamtakashi
10 years ago

A few people reported this crushes their Chrome 38.0.2125.111 in OS X 10.10. It didn't occur to me and I was curious why my Chrome was fine.

After a bit of testing, it appears to me that it was fine for me because I had installed Noto Sans in my system. As soon as I disable the font from the system, Chrome starts to crush. Obviously, only few people have installed the font in their system and this is a default theme which people make child themes with all sorts of other fonts. Although this is a cool idea and I really liked it but it seems to be too early to use in a default theme.

Thoughts?

@iamtakashi
10 years ago

Remove font kerning because it crushes Chrome.

#11 @iandstewart
10 years ago

  • Keywords commit added

Thoughts?

Yes, let's not crash people's browsers. :)

This ticket was mentioned in Slack in #core-themes by iandstewart. View the logs.


10 years ago

#13 follow-up: @afercia
10 years ago

it seems to be too early to use in a default theme

Totally agree. Bit sad though :)
For the ones interested, thanks to @ocean90 live debugging on Slack :) we can summarize:

@ocean90, @tywayne, @mattwiebe, @obenland
they all experienced a tab crash in Chrome 38.0.2125.111 on OS X 10.10 but only when logged in and the admin bar is visible.

@iandstewart couldn't reproduce

@mattwiebe reports:
I also got tab crashing... I then moved to Canary and it was fine.

@iamtakashi pointed out the crash doesn't happen on Mac when "Noto Sans" is installed in your system fonts. @iamtakashi what about "Noto Serif"? was Serif installed too?

Crash not happening on Canary intrigued me and maybe I've found something, not sure but maybe the reason why Canary doesn't crash is this:
https://code.google.com/p/chromium/issues/detail?id=334269#c49
Sep 30, 2014
Switch to HarfBuzz on Mac and remove CoreText shaper

see also: Consider using harfbuzz on Mac and Windows
https://code.google.com/p/chromium/issues/detail?id=286450

HarfBuzz is an OpenType text shaping engine.
"This is what is used in latest versions of Firefox, GNOME, ChromeOS, Chrome Linux, LibreOffice, XeTeX, and Android among other places."

As far as I understand, Chrome on Mac is currently using Core Text and from version 40 will use HarfBuzz.

I can't test on a Mac, my guess is it has to do also with Core Text fonts fallback and the order Google fonts are downloaded. Seems when the admin bar is visible, 'Open Sans' is downloaded before "Noto" and this could be relevant.
Btw, just for testing purposes I'm attaching a patch for the ones willing to debug :)

@afercia
10 years ago

do not commit, just for testing purposes

This ticket was mentioned in Slack in #core-themes by iandstewart. View the logs.


10 years ago

#15 in reply to: ↑ 13 @iamtakashi
10 years ago

Replying to afercia:

@iamtakashi what about "Noto Serif"? was Serif installed too?

Both Serif and Sand are installed but disabling/enabling Not Serif didn't make any difference.

Btw, just for testing purposes I'm attaching a patch for the ones willing to debug :)

I've tried the patch but Chrome still crushes without installing Noto Sans in the system.

Totally agree. Bit sad though :)

Indeed but let's leave this out from the theme at this point.

#16 @iandstewart
10 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 30229:

Twenty Fifteen: Crashing chrome if you don't have Noto installed probably isn't the best experience -- removing font kerning.

Props iamtakashi, fixes #30195

Note: See TracTickets for help on using tickets.