TTF_CreateText3
Create a text object from utf-8 text and a text engine.
Usage
#include "SDL3_ttf/SDL_ttf.h"
TTF_Text * TTF_CreateText(TTF_TextEngine *engine, TTF_Font *font, const char *text, size_t length);
Header file
Defined in SDL3_ttf/SDL_ttf.h
Function parameters
engine
|
the text engine to use when creating the text object, may be NULL. |
|---|---|
font
|
the font to render with. |
text
|
the text to use, in UTF-8 encoding. |
length
|
the length of the text, in bytes, or 0 for null terminated text. |
Return value
( TTF_Text
*) Returns a TTF_Text
object or NULL on failure; call SDL_GetError() for more information.
Thread safety
This function should be called on the thread that created the font and text engine.