← Back to release summary

tech() function support in @font-face src: descriptor

Category
CSS
Type
Chromium catches up
Status
Enabled by default (Chrome 108)
Intent stage
Prepare to ship

WPT details: WPT tests already exist, provided and updated by Jonathan Kew from Mozilla. Those I updated in https://github.com/web-platform-tests/wpt/pull/35681 and https://github.com/web-platform-tests/wpt/pull/35648

Summary

CSS Fonts Level 4 provides additional means of selecting or filtering font resources. The tech() function was introduced, which allows passing in a list of font technologies that this respective font blob requires to function. Based on that, the UA will select the first suitable resource.

Motivation

With COLRv1 font supports, it's now more important to give authors an opportunity to check feature support. Doing this in the tech() function in the src: descriptor of @font-face is one useful tool for incremental upgrade of the user experience. If the UA supports COLRv1 or other new font technologies, the richer font is loaded, otherwise fallback occurs.

Standards & signals

Ecosystem

View on chromestatus.com