← Back to release summary

Local Font Access

Category
Capabilities (Fugu)
Type
New or changed feature
Status
Enabled by default (Chrome 103)
Intent stage
Shipped

Summary

Gives web applications the ability to enumerate local fonts and some metadata about each. Also gives web applications access to table data stored within local fonts, allowing those fonts to be rendered within their applications using custom text stacks.

Motivation

Font enumeration is a missing capability that has prevented modern web apps from making full use of the web platform. Web apps that want to work with local fonts require the user to upload them to a server first. In some cases, web apps ask users to install a separate local program that provides additional capabilities like font enumeration and offers local fonts as a WebFont in order to work around this missing API. The font enumeration API will let a web app get access to a list of local fonts and some metadata without requiring these workarounds. Font table access is a missing capability that has prevented modern web apps from making full use of the web platform. Professional design apps that need pixel-identical text rendering across platforms use libraries such as HarfBuzz and FreeType compiled to WASM to accomplish this. For design apps built for the web that want to use local fonts, they currently require users upload their fonts to a server and from there send the font's raw bytes to their client app for handling by the text shaping libraries. In other cases, web apps ask users to install a separate local program that provides additional capabilities like font enumeration and offers local font table data to the app. The font table access API will let a web app get access to a local font's table data to allow interacting with the fonts in a way that doesn't require these workarounds.

Standards & signals

Docs: https://web.dev/local-fonts https://bit.ly/2HWBOLi https://developer.chrome.com/blog/insider-april-2022/#local-fonts-access-api

Samples: https://font-access-api.glitch.me

Explainers: https://github.com/WICG/local-font-access

View on chromestatus.com