@font-face descriptor advance-override
- Category
- CSS
- Type
- Chromium catches up
- Status
- No longer pursuing (Chrome No longer pursuing)
- Intent stage
- Removed
Summary
The advance-override descriptor scales all character advances of the font face by the given percentage. It can be used to match text width between two fonts, and hence reduce layout shift caused by web font loading.
Motivation
Web font loading is a major cause of layout shifting, because the same text usually has different widths when using fallback font and web font. By using advance-override in the fallback font face, we can match the text width between the two fonts, and hence reduce the layout shift.
Standards & signals
- Specification: https://drafts.csswg.org/css-fonts-5/#descdef-font-face-advance-override
- Firefox: Closed Without a Position
- Safari: No signal
- Web developers: No signals
- Tracking bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1137633
Ecosystem
- Web Platform Tests: https://wpt.fyi/results/?q=font-face-descriptor-advance-override
- Chrome Platform Showcase: https://chrome-platform-showcase.paulkinlan-ea.deno.net/features
- GenDN reference: https://gendn.paulkinlan-ea.deno.net/features
- chrome.dev demos search: https://www.google.com/search?q=site%3Achrome.dev+%40font-face%20descriptor%20advance-override
- MDN Web Docs: https://developer.mozilla.org/en-US/search?q=%40font-face%20descriptor%20advance-override
- Baseline status: https://webstatus.dev/?q=%40font-face%20descriptor%20advance-override
Docs: https://bit.ly/39qATQ4
Explainers: https://gist.github.com/xiaochengh/3aae8a97d1b0388c8e701819b63e2c49