Skip to content

os.font #

fn default #

fn default() string

default returns an absolute path the default system TTF font. If the env variable VUI_FONT is set this is used instead. NOTE that, in some cases, the function calls out to external OS programs so running this in a hot loop is not advised.

fn get_path_variant #

fn get_path_variant(font_path string, variant Variant) string

get_path_variant returns the font_path file name replaced with the file name of the font's variant version if it exists.

enum Variant #

enum Variant {
	normal = 0
	bold
	mono
	italic
}

Variant enumerates the different variants a font can have.