This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The FontFace interface represents a single usable font face. It allows control of the source of the font face, being a URL to an external resource, or a buffer; it also allows control of when the font face is loaded and its current status.

Constructor

FontFace()
Constructs and returns a new FontFace object, built from an external resource described by an URL or from an ArrayBuffer.

Properties

This interface doesn't inherit any property.

FontFace.display
Is a CSSOMString that determines how a font face is displayed based on whether and when it is downloaded and ready to use.
FontFace.family
Is a CSSOMString that contains the family of the font. It is equivalent to the font-family descriptor.
FontFace.style
Is a CSSOMString that contains the style of the font. It is equivalent to the font-style descriptor.
FontFace.weight
Is a CSSOMString that contains the weight of the font. It is equivalent to the font-weight descriptor.
FontFace.stretch
Is a CSSOMString that contains how the font stretches. It is equivalent to the font-stretch descriptor.
FontFace.unicodeRange
Is a CSSOMString that contains the range of code encompassed the font. It is equivalent to the unicode-range descriptor.
FontFace.variant
Is a CSSOMString that contains the variant of the font. It is equivalent to the font-variant descriptor.
FontFace.featureSettings
Is a CSSOMString that contains the features of the font. It is equivalent to the font-feature-settingsdescriptor.
FontFace.status Read only
Returns an enumerated value indicating the status of the font. It can be one of the following: "unloaded", "loading", "loaded", or "error".
FontFace.loaded Read only
Returns a Promise to a FontFace that fulfills when the font is completely loaded and rejects when an error happens.

Methods

This interface doesn't inherit any method.

FontFace.load()
Loads the font, returning a Promise to a FontFace that fulfills when the font is completely loaded and rejects when an error happens.

Specifications

Specification Status Comment
CSS Font Loading Module Level 3
The definition of 'FontFaceSet' in that specification.
Working Draft Initial definition

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
Basic support
Experimental
Chrome Full support 35Edge ? Firefox Full support 41IE ? Opera ? Safari ? WebView Android Full support 37Chrome Android Full support 35Edge Mobile ? Firefox Android Full support 41Opera Android ? Safari iOS ? Samsung Internet Android ?
FontFace() constructor
Experimental
Chrome Full support 35Edge ? Firefox Full support 41IE ? Opera ? Safari ? WebView Android Full support 37Chrome Android Full support 35Edge Mobile ? Firefox Android Full support 41Opera Android ? Safari iOS ? Samsung Internet Android ?
display
Experimental
Chrome Full support 60Edge ? Firefox No support NoIE ? Opera Full support 47Safari No support NoWebView Android Full support 60Chrome Android Full support 60Edge Mobile ? Firefox Android No support NoOpera Android Full support 47Safari iOS No support NoSamsung Internet Android ?
family
Experimental
Chrome Full support YesEdge ? Firefox ? IE ? Opera Full support YesSafari ? WebView Android Full support YesChrome Android Full support YesEdge Mobile ? Firefox Android ? Opera Android Full support YesSafari iOS ? Samsung Internet Android ?
style
Experimental
Chrome ? Edge ? Firefox ? IE ? Opera ? Safari ? WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
weight
Experimental
Chrome ? Edge ? Firefox ? IE ? Opera ? Safari ? WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
stretch
Experimental
Chrome ? Edge ? Firefox ? IE ? Opera ? Safari ? WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
unicodeRange
Experimental
Chrome ? Edge ? Firefox ? IE ? Opera ? Safari ? WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
variant
Experimental
Chrome ? Edge ? Firefox ? IE ? Opera ? Safari ? WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
featureSettings
Experimental
Chrome ? Edge ? Firefox ? IE ? Opera ? Safari ? WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
status
Experimental
Chrome ? Edge ? Firefox ? IE ? Opera ? Safari ? WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
loaded
Experimental
Chrome ? Edge ? Firefox ? IE ? Opera ? Safari ? WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
load
Experimental
Chrome ? Edge ? Firefox ? IE ? Opera ? Safari ? WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown
Experimental. Expect behavior to change in the future.
Experimental. Expect behavior to change in the future.

Document Tags and Contributors

Contributors to this page: fscholz, jakkrobbit, jpmedley, jsx, Alhadis, teoli
Last updated by: fscholz,