Library

font

table

Font descriptor lookup and registration for the overlay UI and the immediate-mode renderer.

Functions

3

#font.get_font_descriptor(fontName: string, fontSize: number) → FontDescriptor

since 1.6.15-alpha

Creates an object that describes a font and its properties.

Parameters

fontNamestring

The name of the font

fontSizenumber

The size of the font

#font.request_font_reload() → ()

since 1.6.15-alpha

Requests for all fonts to be reloaded on the next frame. Used after obtaining new FontDescriptor objects.

#font.add_ttf_font(fontName: string, ttfData: buffer) → boolean

since 1.6.15-alpha

Adds a font given its binary TrueType font data to the custom fonts folder of this Madius installation. Returns true if the font is successfully added.

Parameters

fontNamestring

The name of the font

ttfDatabuffer

The TTF data