os.font #
Copyright (c) 2019-2024 Alexander Medvednikov. All rights reserved. Use of this source code is governed by an MIT license that can be found in the LICENSE file.
fn default #
@[manualfree]
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 #
@[manualfree]
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.