Skip to content

cf_draw_text

Category: text
GitHub: cute_draw.h


Draws text.

void cf_draw_text(const char* text, CF_V2 position, int num_chars_to_draw /*= -1*/);
Parameters Description
text The text to draw.
position The top-left corner of the text.
num_chars_to_draw The number of characters to draw text. Use -1 to draw the whole string.

Remarks

num_chars_to_draw is a great way to control how many characters to draw for implementing a typewriter style effect.

The characters in a markup (e.g: <wave>) do not contribute to the total number of characters rendered (num_chars_to_draw). You can use cf_text_without_markups to strip all markups from a string.

cf_make_font
cf_text_without_markups
cf_text_effect_register