Package-level declarations

Types

Link copied to clipboard
sealed interface FontDisplay
Link copied to clipboard
open class FontFace(var family: String, source: String, descriptors: FontFaceDescriptors = definedExternally)

The FontFace interface of the CSS Font Loading API represents a single usable font face.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

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

Link copied to clipboard
open class FontFaceSetLoadEvent(val type: EventType<FontFaceSetLoadEvent>, init: FontFaceSetLoadEventInit = definedExternally) : Event

The FontFaceSetLoadEvent interface of the CSS Font Loading API represents events fired at a FontFaceSet after it starts loading font faces.

Link copied to clipboard
Link copied to clipboard

Properties

Link copied to clipboard
val ERROR CLASS: Symbol not found for FontDisplay.Companion.auto: FontDisplay
Link copied to clipboard
val ERROR CLASS: Symbol not found for FontDisplay.Companion.block: FontDisplay
Link copied to clipboard
val ERROR CLASS: Symbol not found for FontFaceLoadStatus.Companion.error: FontFaceLoadStatus
Link copied to clipboard
val ERROR CLASS: Symbol not found for FontDisplay.Companion.fallback: FontDisplay
Link copied to clipboard
val ERROR CLASS: Symbol not found for FontFaceLoadStatus.Companion.loaded: FontFaceLoadStatus
val ERROR CLASS: Symbol not found for FontFaceSetLoadStatus.Companion.loaded: FontFaceSetLoadStatus
Link copied to clipboard
val ERROR CLASS: Symbol not found for FontFaceLoadStatus.Companion.loading: FontFaceLoadStatus
val ERROR CLASS: Symbol not found for FontFaceSetLoadStatus.Companion.loading: FontFaceSetLoadStatus
Link copied to clipboard
val ERROR CLASS: Symbol not found for FontDisplay.Companion.optional: FontDisplay
Link copied to clipboard
val ERROR CLASS: Symbol not found for FontDisplay.Companion.swap: FontDisplay
Link copied to clipboard
val ERROR CLASS: Symbol not found for FontFaceLoadStatus.Companion.unloaded: FontFaceLoadStatus

Functions

Link copied to clipboard
inline suspend fun FontFace.load(): FontFace

The load() method of the FontFace interface requests and loads a font whose source was specified as a URL. It returns a Promise that resolves with the current FontFace object.

inline suspend fun FontFaceSet.load(font: String): ReadonlyArray<FontFace>
inline suspend fun FontFaceSet.load(font: String, text: String): ReadonlyArray<FontFace>

The load() method of the FontFaceSet forces all the fonts given in parameters to be loaded.