The FontFaceSet interface of the CSS Font Loading API manages the loading of font-faces and querying of their download status.

Documentation FontFaceSet by Mozilla Contributors, licensed under CC-BY-SA 2.5.

See also:

Variables

onloading:Function

An EventListener called whenever an event of type loading is fired, indicating a font-face set has started loading.

onloadingdone:Function

An EventListener called whenever an event of type loadingdone is fired, indicating that a font face set has finished loading.

onloadingerror:Function

An EventListener called whenever an event of type loadingerror is fired, indicating that an error occurred whilst loading a font-face set.

read onlyready:Promise<Void>

read onlysize:Int

read onlystatus:FontFaceSetLoadStatus

Indicates the font-face's loading status. It will be one of 'loading' or 'loaded'.

Methods

add(font:FontFace):Void

Throws:

null

DOMError

@:value({ text : " " })check(font:String, text:String = " "):Bool

Throws:

null

DOMError

forEach(cb:(FontFace, FontFace, FontFaceSet) ‑> Void, ?thisArg:Dynamic):Void

Throws:

null

DOMError

@:value({ text : " " })load(font:String, text:String = " "):Promise<Array<FontFace>>

Inherited Variables

Inherited Methods

Defined by EventTarget

addEventListener(type:String, listener:Function, ?options:EitherType<AddEventListenerOptions, Bool>, ?wantsUntrusted:Bool):Void

addEventListener(type:String, listener:EventListener, ?options:EitherType<AddEventListenerOptions, Bool>, ?wantsUntrusted:Bool):Void

Register an event handler of a specific event type on the EventTarget.

Throws:

null

DOMError

dispatchEvent(event:Event):Bool

Dispatch an event to this EventTarget.

Throws:

null

DOMError

removeEventListener(type:String, listener:Function, ?options:EitherType<EventListenerOptions, Bool>):Void

removeEventListener(type:String, listener:EventListener, ?options:EitherType<EventListenerOptions, Bool>):Void

Removes an event listener from the EventTarget.

Throws:

null

DOMError