LoadFont

Load a TTF/OTF font into ImGui and return its handle.

Syntax

Susano.LoadFont(path, size_px) -> number

Parameters

circle-info

path (string): Absolute or relative path to a TTF/OTF file.

size_px (number): Native pixel size for this font.

Return(s)

circle-info

fontId (number): Handle to use with Susano.PushFont.

On error: nil, err (string).

Behavior

circle-info

Registers the font in the Susano renderer atlas. Must be called once for each font.

The returned fontId is valid for the current session.

Does not change the active font by itself.

Example(s)

Last updated