FontFaceSet extension type

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

A FontFaceSet instance is a Set-like object that can hold an ordered set of FontFace objects.

This property is available as Document.fonts, or self.fonts in web workers.

on
Implemented types

Constructors

FontFaceSet(JSArray<FontFace> initialFaces)
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
onloading EventHandler?
getter/setter pair
onloadingdone EventHandler?
getter/setter pair
onloadingerror EventHandler?
getter/setter pair
ready JSPromise<FontFaceSet>
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
status FontFaceSetLoadStatus
no setter

Methods

add(FontFace font) FontFaceSet
The add() method of the FontFaceSet interface adds a new font to the set.
addEventListener(String type, EventListener? callback, [JSAny options]) → void
The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.
inherited
check(String font, [String text]) bool
The check() method of the FontFaceSet returns true if you can render some text using the given font specification without attempting to use any fonts in this FontFaceSet that are not yet fully loaded. This means you can use the font specification without causing a font swap.
clear() → void
The clear() method of the FontFaceSet interface removes all fonts added via this interface. Fonts added with the rule are not removed.
delete(FontFace font) bool
The delete() method of the FontFaceSet interface removes a font from the set.
dispatchEvent(Event event) bool
The dispatchEvent() method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order. The normal event processing rules (including the capturing and optional bubbling phase) also apply to events dispatched manually with dispatchEvent().
inherited
load(String font, [String text]) JSPromise<JSArray<FontFace>>
The load() method of the FontFaceSet forces all the fonts given in parameters to be loaded.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeEventListener(String type, EventListener? callback, [JSAny options]) → void
The removeEventListener() method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener from the target. The event listener to be removed is identified using a combination of the event type, the event listener function itself, and various optional options that may affect the matching process; see Matching event listeners for removal.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited