Skip to content

cf_text_size

Category: text
GitHub: cute_draw.h


Returns the width/height of a text given the currently pushed font.

CF_V2 cf_text_size(const char* text, int num_chars_to_draw);
Parameters Description
text The text considered for rendering.
num_chars_to_draw The number of characters to draw text. Use -1 to draw the whole string.

Remarks

This function is slightly superior to cf_text_width or cf_text_height if you need both width/height, as it will run the layout code only a single time.

cf_make_font
cf_text_width
cf_text_height
cf_draw_text