Local Font Access

Gives web applications the ability to enumerate local fonts and some metadata about each. Today, no API exists to provide a list of local fonts to web applications. 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.

Documentation

Specification

Editor's draft

Status in Chromium

Blink>Fonts


In developer trial (Behind a flag) (tracking bug) in:

  • Chrome for desktop release 87

Consensus & Standardization

After a feature ships in Chrome, the values listed here are not guaranteed to be up to date.

  • No signal
  • No signal
  • No signal
  • Strongly positive

Owners

Comments

An earlier version of this API was discussed here: https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/G-hC66MRTso/uVrmHV0NAwAJ And a more recent version here: https://groups.google.com/a/chromium.org/g/blink-dev/c/pb8sjXyFFg4/m/oH_XpCMxAQAJ It has since been updated based on feedback from experts. This version of the API takes into account and reflects that feedback.

Last updated on 2020-10-25