font-display: optional should not create an unstable render |
|||
Issue descriptionhttps://static-misc.glitch.me/optional-font-load/ Open the above page in a fresh tab. The green line jumps because the page is laid out using a fallback font, then re-rendered quickly using the web font. https://drafts.csswg.org/css-fonts-4/#font-display-desc - the spec is unclear what to do in this case (I think it should be more specific). But IMO: Blocking in this case should be total render blocking. Nothing further should be laid-out or painted until the font is fetched (basically the same behaviour we have for system fonts). The font should be fetched with a cache mode (https://fetch.spec.whatwg.org/#concept-request-cache-mode) of "only-if-cached". If the fetch fails, use the fallback & never swap.
,
Oct 23
*Technically* this behavior is mandated by the spec, at least sorta. "optional" gives the font a very small block period; during the block period, the browser must render with an invisible fallback font. I agree that this is bad behavior tho. Assuming that this can be fixed in impl, I'm happy to change the spec as appropriate.
,
Oct 23
,
Oct 26
|
|||
►
Sign in to add a comment |
|||
Comment 1 by jakearchibald@chromium.org
, Oct 23