Skip to content

cf_make_font

Category: text
GitHub: cute_draw.h


Constructs a font for rendering text.

CF_Result cf_make_font(const char* path, const char* font_name);
Parameters Description
path A virtual path to the font file. See Virtual File System.
font_name A unique name for this font. Used by cf_push_font and friends.

Return Value

Returns any errors as CF_Result.

Remarks

Memory is only consumed when you draw a certain glyph (text character). Just loading up the font initially is a low-cost operation. You may load up many fonts with low overhead. Please note that bold, italic, etc. are actually different fonts and each must be loaded up individually.

cf_draw_text
cf_make_font_from_memory
cf_destroy_font
cf_push_font
cf_push_font_size
cf_push_font_blur