Contact emailsoyip...@chromium.org, jsb...@chromium.org
Design docsBlog: https://web.dev/local-fonts/Design Doc: https://bit.ly/2HWBOLi
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.
TAG review statusPending
Interoperability and Compatibility
This API has been designed to support feature detection to allow applications to gracefully degrade based on the capabilities different user agents offer.
We expect developers using this API to use a mix of local and web-provided fonts.
If this feature were removed from the platform, sites would lose the ability to enumerate local fonts and retrieve font data but otherwise are expected to continue to function.
: No signalWebKit
: No signalWeb developers
: Strongly positive (https://crbug.com/535764#c2
) Very positive support from web applications that interact with local fonts, such as Figma.
The feature builds both enumeration and data access into the same new API. Separation was strongly considered but rejected. (See the Explainer for more details.) That may limit use.
Developers will be able to take advantage of this feature immediately since it uses the same available local fonts that other native applications have access to. The API makes it possible to add a font picker (either UX-driven or algorithmic) and API usage will see more traction once popular UI libraries build font pickers on top of it.
Content for this API is available immediately since the API uses locally-installed fonts that are already present on the user's system. Usage of this API by an average web developer will require additional text shaping software that would render fonts based on data returned by this API. (eg. a Harfbuzz-in-WASM library)
The API provides access to full font data in local fonts which can expose additional information about a user's installed configuration to a web application.
This new API is behind a permission prompt, making this an active fingerprinting target. See the TAG review's security and privacy questionnaire for more info: https://github.com/wicg/local-font-access/blob/master/security-privacy.md
We are exploring ways to mitigate the fingerprinting risk by way of changing the user experience through UIs. We don't expect the API shape to be affected.
Goals for experimentation
We will validate the shape of the API with a wider set of developers than from those we worked with in Dev Trial. In particular, we'd like to see if the metadata exposed is sufficient for most use-cases.
We will also validate some performance assumptions we made with a wider set of users.
Ongoing technical constraints
No special considerations.
Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?No
All Blink platforms make use of local fonts, so this feature is useful on all platforms. Only the desktop (Windows, Mac, Linux, ChromeOS) platforms will be supported at first due to the use-cases we're looking at occur predominantly on the desktop.No
Link to entry on the Chrome Platform Statushttps://chromestatus.com/feature/6234451761692672