Web facing change: timeout for web fonts

146 views
Skip to first unread message

Kenji Baheux

unread,
Mar 12, 2014, 10:50:10 PM3/12/14
to Chromium-dev, blink-dev
Chromites and Blinkers,

With M35 (rev. 168258), Chrome/Blink,
  • will start a per web font countdown (3 seconds) as soon as the download starts
  • during the countdown, the text is rendered with the fallback font but is not visible (unchanged)
  • when the countdown runs off, Chrome/Blink will reveal the text rendered with the fallback font if the given web font takes more than 3 seconds to download.
  • when the web font becomes available, Chrome/Blink will re-render the text with the web font.

This is largely similar to Firefox's behavior. The main difference I'm aware of is the fact that Firefox has extra logic to extend the countdown if the web font is almost there. We'll keep an eye on feedback and metrics to decide if we need a less stringent countdown.

We looked at our web font metrics and found out that the 3s value currently affects about 4% of web font downloads. For reference, here are some completion ratios for different values of the timeout:
  • 3.5s = 96.6% (Android), 96.8%  (Desktop) 
  • 3s   = 95.8% (Android), 96.2%  (Desktop)
  • 2s   = 92.5%   (Android), 93.9%  (Desktop)
  • 1s   = 81.2%   (Android), 87.5%  (Desktop)

In short, we believe that the 3s value is a reasonable choice because not only the completion ratio is reasonable on both mobile and desktop but it's also consistent with Firefox's timeout. However, as the performance of web fonts improves, we'll regularly revisit this topic and we'll keep you informed of any changes.

Finally, let me note that you can achieve your own web font fallback behavior by taking advantage of the CSS Font Loading API which also ships in M35.


Best,

--
Kenji BAHEUX
Product Manager - Chrome
Google Japan

PhistucK

unread,
Mar 13, 2014, 4:06:21 PM3/13/14
to Kenji Baheux, Chromium-dev, blink-dev
Wonderful.
When you write "as soon as download starts" - you mean as soon as the request is sent, right?


PhistucK


To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

Kunihiko Sakamoto

unread,
Mar 13, 2014, 9:17:11 PM3/13/14
to PhistucK, Kenji Baheux, Chromium-dev, blink-dev
Yes, as soon as the request is sent.


Kunihiko Sakamoto
Reply all
Reply to author
Forward
0 new messages