Skip to content

Fonts

Functions

GFont fonts_get_system_font(const char *font_key)

Loads a system font corresponding to the specified font key.

Parameters
  • font_key: The string key of the font to load. See System Fonts guide for a list of system fonts.
Returns

An opaque pointer to the loaded font, or, a pointer to the default (fallback) font if the specified font cannot be loaded.

GFont fonts_load_custom_font(ResHandle handle)

Loads a custom font.

Parameters
  • handle: The resource handle of the font to load. See resource_ids.auto.h for a list of resource IDs, and use resource_get_handle() to obtain the resource handle.
Returns

An opaque pointer to the loaded font, or a pointer to the default (fallback) font if the specified font cannot be loaded.

void fonts_unload_custom_font(GFont font)

Unloads the specified custom font and frees the memory that is occupied by it.

Parameters
  • font: The font to unload.

Typedefs

typedef struct FontInfo FontInfo

typedef FontInfo* GFont

Pointer to opaque font data structure.