logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

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

Availability

       This function is available since SDL_ttf 3.0.0.

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.

Header File

       Defined in SDL3_ttf/SDL_ttf.h

Name

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

Return Value

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

See Also

(3), TTF_DestroyText(3)

SDL_ttf                                           SDL_ttf 3.2.2                                TTF_CreateText(3)

Synopsis

#include"SDL3_ttf/SDL_ttf.h"TTF_Text*TTF_CreateText(TTF_TextEngine*engine,TTF_Font*font,constchar*text,size_tlength);

Thread Safety

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

See Also