Fonts

The fonts registered for all programs, which the registries of compositions and of user interfaces fall back on

Properties

Link copied to clipboard

The font file used for families that are not registered, the fallback of the parent when null

Link copied to clipboard

Functions

Link copied to clipboard
fun candidates(families: List<String>, weight: Int = 400, italic: Boolean = false, faces: List<FontFace> = emptyList()): List<String>

The font files for families, in order of preference: for every family, the sources of the matching one of faces or the registered file, then fallback. Faces are matched like registrations are. A font that can not be loaded is followed by the fonts of the next families, as in CSS.

Link copied to clipboard

true when family is registered here or in the parent

Link copied to clipboard
fun register(family: String, fileOrUrl: String, weight: Int = 400, italic: Boolean = false)

Registers the font file for a font family, weight and style. A later registration of the same family, weight and style replaces it.

Link copied to clipboard
fun resolve(families: List<String>, weight: Int = 400, italic: Boolean = false): String?

The font file for the first registered family in families, with the requested style and the nearest weight, or fallback