invoke

abstract suspend operator fun invoke(info: FontInfo.() -> Unit): Font?

Tries to find a loaded font matching the given info.

Return

the font IFF found

Parameters

info

of the font


open suspend operator fun invoke(font: Font, info: FontInfo.() -> Unit): Font?

Tries to find a loaded font matching the given font with info overrides.

val font = ...

loader(font) {
weight = 700 // looks for variant of font with weight == 700
}

Return

the font IFF found

Parameters

info

of the font


abstract suspend operator fun invoke(source: String, info: FontInfo.() -> Unit): Font?

Tries to loaded a font matching the given info.

Return

the font IFF found

Parameters

source

where the font is located (i.e. a filename or url)

info

of the font