Simp module

load_font

procedure · 1 overloadSource

Loads a font file at one size. Returns null when the file cannot be read.

load_font :: (
    path: string,
    basename: string,
    pixel_height: int,
    pixel_scale := 1.0
) -> font: *Dynamic_Font

Loads a font file at one size. Returns null when the file cannot be read.

Parameters

path: string
the folder the font file is in. Empty means basename is the whole path.
basename: string
the font file, for instance a .ttf.
pixel_height: int
how tall the text is in pixels.
pixel_scale := 1.0
device pixels per pixel, for sharp text on a high-density display. Glyphs are made at pixel_height * pixel_scale and measured back in pixel_height units.

Returns

See also