loadFont

fun Program.loadFont(fileOrUrl: String, size: Double, characterSet: Set<Char> = defaultFontmapCharacterSet, contentScale: Double = this.drawer.context.contentScale, fontScaler: (Face) -> Double = ::fontHeightScaler): FontImageMap(source)

Load a FontImageMap

Parameters

fileOrUrl

a string containing a path to a font file or a url

size

the size at which to rasterize the glyphs in the font

characterSet

the characters to use when rasterizing the glyphs

contentScale

the content scale at which to rasterize the glyphs

fontScaler

a function that determines the scale of rasterization based on size