- From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
- Date: Fri, 24 Jan 2020 17:22:12 +0000
- To: public-css-archive@w3.org
The CSS Working Group just discussed `font-display: optional`, and agreed to the following: * `RESOLVED: change normative text for font-display optional to say that the font should never change rendering of the page if it would you'd still just treat the load as failed and don't use it again` * `RESOLVED: Add notes for implementors and authors to the spec, specific contents TBD` <details><summary>The full IRC log of that discussion</summary> <emilio> topic: font-display: optional<br> <astearns> github: https://github.com/w3c/csswg-drafts/issues/4108<br> <emilio> TabAtkins: I think we probably have a plan even if WebKit disagrees with this<br> <emilio> ... I don't think we will get into a deadlock<br> <emilio> ... As I said, the main goal of optional was to avoid layout shift<br> <emilio> ... layout shift is really annoying and font-display: optional aims to solve that<br> <emilio> ... another is performance<br> <emilio> ... turns out that our data is that our the extra style and layout that the font load triggers delays stable layout significantly<br> <emilio> ... and if you waited one or two frames you'd just get the final layout faster than if you did everything eagerly<br> <emilio> ... and getting reasonable assurance about getting local fonts or downloaded fonts getting caches in getting the details of this right<br> <emilio> ... and interesting quirk I found yesterday, some of our internal teams are using font-display: optional on iOS because caches there are usually faster than most android phone<br> <emilio> ... so it usually hits the cache faster and if so... that's great<br> <emilio> myles: I see your strategy :P<br> <emilio> TabAtkins: Proposal is that for preloaded fonts, as soon as you see the preload tag, or as soon as you see the font-face rule that would refer to them, pull them be into the memory cache<br> <emilio> ... for normal pages you should be able to get all the fonts you're using<br> <emilio> ... when you start loading, if any of the loads triggered not from the cache, you're allowed to delay rendering before starting your first layout<br> <emilio> ... and if you can't (too slow / whatever), then you discard the load and never use them again for the lifetime of the page<br> <emilio> myles: I don't think any of those changes require any changes to any spec<br> <emilio> ... the distinction between memory / disk cache is not something that should be on any spec<br> <emilio> ... and if you use fuzzy words I don't think they would mean anything<br> <emilio> ... specs doesn't forbid Chrome to delay rendering<br> <emilio> ... so it's untestable, doesn't need to be in any spec, I'd be ok with no change<br> <emilio> TabAtkins: I don't think I disagree with you, but it'd be good to hint to other implementations about how you can achieve a high quality implementation for this feature<br> <emilio> myles: yeah that's good, but shouldn't be normative<br> <emilio> TabAtkins: ok, compromise proposal: We remove normative text about delaying rendering or what not, and we only state that optional fonts must not cause layout jank<br> <emilio> ... and then provide notes to implementations<br> <emilio> chrishtr: I think the spec must be clear that it's acceptable to delay rendering rather to do partial rendering<br> <emilio> TabAtkins: yeah I'll put that in<br> <emilio> myles: in the notes<br> <emilio> TabAtkins: in the notes<br> <emilio> myles: you can totally describe the intended use case in the spec<br> <emilio> chrishtr: right now our implementation of font-display: optional can cause two layouts. I don't think it show<br> <emilio> TabAtkins: yeah that's the normative text described above means<br> <emilio> ... well as long as pixels don't move you're fine<br> <emilio> myles: I think that's an important distinction<br> <emilio> ... if you want you can do layout every frame<br> <emilio> chrishtr: agreed<br> <emilio> fremy: when you have sheets in a document you never render before they load right?<br> <emilio> TabAtkins: if you see them early enough or such<br> <emilio> fremy: what I want to say is that there is a precedent for this<br> <emilio> TabAtkins: proposed text is to change normative text for font-display optional to say that the font should never change rendering of the page<br> <emilio> ... if it would you'd still just treat the load as failed and don't use it again<br> <emilio> fremy: I don't really understand what's the difference between the font-face behavior and the stylesheet behavior<br> <emilio> emilio: the main difference is that for stylesheets you statically know it applies, but to determine the fonts you need is that you need to do layout and styling<br> <emilio> chrishtr: I think the main proposal to web devs is to add a <link rel=preload> for important fonts and then use the font-display: optional to avoid the jank<br> <fantasai> I think it's important to distinguish it from the block behavior<br> <emilio> astearns: objections to the proposed resolution<br> <emilio> ?<br> <fantasai> You don't want to make the user wait more than a brief, mostly-unnoticeable moment in the case of font-display: optional<br> <fantasai> otherwise it's not really "optional"<br> <TabAtkins> fantasai, oh yes it's distinguished already; i'm just gonna remove a bit of semi-normative text<br> <fantasai> ok<br> <emilio> RESOLVED: change normative text for font-display optional to say that the font should never change rendering of the page if it would you'd still just treat the load as failed and don't use it again<br> <emilio> jfkthame: the phrasing about the suggestion about <link rel=preload> about an important font seems a bit off to me<br> <emilio> ... because tagging it as font-display: optional means that it is _not_ an important font<br> <emilio> TabAtkins: you'd get the desired thing most of the time assuming a high-quality implementation<br> <emilio> astearns: there are a couple more assumptions there, like fast network, fast disk, no contention...<br> <emilio> chrishtr: we could probably add the <link rel=preload> bit separate from font-display: optional<br> <emilio> RESOLVED: Add notes for implementors and authors to the spec, specific contents TBD<br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4108#issuecomment-578222439 using your GitHub account
Received on Friday, 24 January 2020 17:22:14 UTC