Font
Font module provides functions to parse font file, extract glyph shape and render glyph bitmap using CPU.
Types
-
Represents a font file that may contain one or multiple fonts.
Alias types
-
The index type of one font glyph.
Constants
-
constexpr glyph_t INVALID_GLYPH
A special index value that identifies one invalid glyph.
-
The command value that starts a new contour, followed by two data points: x, y.
-
The command value that draws a line to the specified point, followed by two data points: x, y.
-
constexpr i16 COMMAND_CURVE_TO
The command value that draws a Quadratic Belzier curve to the specified point, followed by four data points: cx, cy, x, y.
Functions
-
R< Ref< IFontFile > > load_ttf_font_file(const byte_t *data, usize data_size)
Creates a font file object by parsing the provided TTF or TTC font file data.
-
IFontFile * get_default_font()
Gets the default font object, which is embedded into the SDK and only supports for ASCII codepoint range.