FontFace.load

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

let 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 DOMException if the loading process fails.

Exceptions

NetworkError

Indicates that the attempt to load the font failed.

Specifications

Specification
CSS Font Loading Module Level 3 (CSS Font Loading 3)
# font-face-load

Browser compatibility

BCD tables only load in the browser