Re: [csswg-drafts] [css-fonts] Add a `font-display` keyword to eliminate `@font-face` FOIT & layout shifts (#7271)

> > fonts used for essential UI components, e.g. [Google Material Symbols](https://fonts.google.com/icons)
> 
> Icon fonts are an anti-pattern and we should not build new CSS features for them.

In addition, I am still uneasy with the idea that such an icon font *should* ever block rendering of the page. Surely `font-display: block` is the more appropriate way to handle them.

Yes, it's not guaranteed to prevent any layout shift. That's the nature of the internet, if a page is dependent on a variety of resources that may load at different speeds (or might occasionally fail to load at all).

Developers still have the option of using the Font Loading API to manage fonts, and could use this to explicitly block rendering until certain resources are ready. So they don't *need* this proposal in order to achieve that outcome. It may make it easier, but I'm not sure that's desirable. As the [original comment](https://github.com/w3c/csswg-drafts/issues/7271#issue-1233274200) said, it will be footgun-ish. We shouldn't be making footguns more readily accessible.


-- 
GitHub Notification of comment by jfkthame
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7271#issuecomment-1156138057 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 15 June 2022 08:09:41 UTC