Skip to content

os.font

fn default #

fn default() string

default returns an absolute path to a readable default font. Search order:1. The env variable VUI_FONT.2. A user-provided fallback font under ${os.config_dir()}/v/fonts.3. Platform defaults and fc-match.4. Bundled fonts under @VEXEROOT/examples/assets/fonts. 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.

fn Variant.from #

fn Variant.from[W](input W) !Variant

enum Variant #

enum Variant {
	normal = 0
	bold
	mono
	italic
}

Variant enumerates the different variants a font can have.