CompositionFonts

Resolves the font families of text in compositions to font files, see fontFamily, fontWeight and fontStyle. Registers in and resolves with Fonts, the fonts of all programs, which user interfaces use too.

Properties

Link copied to clipboard

The font file used for families that are not registered, by default OPENRNDR's default font

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, see org.openrndr.extra.textwriter.FontRegistry.candidates

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. Families are matched without regard to case.

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