DOKK / manpages / debian 13 / libsdl3-ttf-doc / TTF_CreateText.3.en
TTF_CreateText(3) SDL_ttf3 FUNCTIONS TTF_CreateText(3)

TTF_CreateText - Create a text object from UTF-8 text and a text engine.

Defined in SDL3_ttf/SDL_ttf.h

#include "SDL3_ttf/SDL_ttf.h"
TTF_Text * TTF_CreateText(TTF_TextEngine *engine, TTF_Font *font, const char *text, size_t length);

the text engine to use when creating the text object, may be NULL.
the font to render with.
the text to use, in UTF-8 encoding.
the length of the text, in bytes, or 0 for null terminated text.

( TTF_Text
*) Returns a TTF_Text
object or NULL on failure; call SDL_GetError() for more information.

This function should be called on the thread that created the font and text engine.

This function is available since SDL_ttf 3.0.0.

(3), TTF_DestroyText(3)

SDL_ttf 3.2.2 SDL_ttf