Draft
This page is not complete.
Experimental
This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The load()
method of the
FontFace
interface loads a font based on current object's
constructor-passed requirements, including a location or source buffer, and returns a
Promise
that resolves with the current FontFace object.
Syntax
var promise = FontFace.load();
Parameters
None.
Return value
A Promise
that resolves with a reference to the current
FontFace
object when the font loads or rejects with a NetworkError if the
loading process fails.
Exceptions
- NetworkError
- Indicates that the attempt to load the font failed.
Specifications
Specification | Status | Comment |
---|---|---|
CSS Font Loading Module Level 3 The definition of 'load' in that specification. |
Working Draft | Initial definition. |
Browser compatibility
BCD tables only load in the browser