W3C home > Mailing lists > Public > public-css-archive@w3.org > December 2017

Re: [csswg-drafts] [css-fonts-4] Font loading behavior when the descriptor is modified via CSSOM

From: Kenji Baheux via GitHub <sysbot+gh@w3.org>
Date: Wed, 20 Dec 2017 07:47:21 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-352989765-1513756040-sysbot+gh@w3.org>
Sorry, I missed the cc notification and wasn't aware that this was on the agenda at one point.

Here is what I think make sense and would help solving use cases from interested parties (e.g. crbug.com/762957). 

When font display is changed, the UA considers the active period:
 - block period
 - swap period
 - failure period

A font-display change can only affect the active period in the following manner: 
 - block => block
 - block => swap
 - block => failure
 - failure => swap
 - swap => failure

In order words, a block period can be extended (e.g. from optional and fallback's 100ms to block's 3s) but not introduced (e.g. starting from font-display: swap to font-display: block). This helps avoid hiding text that was already shown.

The timeout is only reset when the web font download is restarted or resumed. For instance, starting with font-display: optional a UA may decide to not download the font at all. A few seconds later, if the developer changes to font-display: fallback, the UA will start the web font download and start a swap period of 3s.

What do you think?

GitHub Notification of comment by KenjiBaheux
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1358#issuecomment-352989765 using your GitHub account
Received on Wednesday, 20 December 2017 07:47:23 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:21 UTC