TTF_CreateG...thProperties(3)
π TTF_CreateGPUTextEngineWithProperties(3) π
okay bestie, so we're deep in the SDL_ttf3 function zone, and this one is giving "I make text engines for the GPU" β¨ It's TTF_CreateGPUTextEngineWithProperties, and yes the title is truncated with ... because Unix manpage titles have a character budget and honestly, same. π«Ά
πΈ NAME πΈ
TTF_CreateGPUTextEngineWithProperties β Create a text engine for drawing text with the SDL GPU API, with the specified properties. periodt π
π HEADER FILE π
Defined in SDL3_ttf/SDL_ttf.h β that's the one you're gonna #include, no cap.
β¨ SYNOPSIS β¨
#include "SDL3_ttf/SDL_ttf.h"
TTF_TextEngine * TTF_CreateGPUTextEngineWithProperties(SDL_PropertiesID props);
#define TTF_PROP_GPU_TEXT_ENGINE_DEVICE SDL_ttf.gpu_text_engine.create.device"
#define TTF_PROP_GPU_TEXT_ENGINE_ATLAS_TEXTURE_SIZE SDL_ttf.gpu_text_engine.create.atlas_texture_size"
Like, look at those two macros. They're the whole vibe check for this function. π
π DESCRIPTION π
So these are the supported properties, and bestie, there are exactly two:
TTF_PROP_GPU_TEXT_ENGINE_DEVICEβ theSDL_GPUDeviceyou wanna use for creating textures and drawing text. This is your main character. πTTF_PROP_GPU_TEXT_ENGINE_ATLAS_TEXTURE_SIZEβ the size of the texture atlas. Big atlas, big energy.
π¦ FUNCTION PARAMETERS π¦
propsβ the properties to use. That's it, that's the whole list, she's low maintenance. π
π RETURN VALUE π
Returns a TTF_TextEngine object... or NULL on failure π and if that happens you gotta call SDL_GetError() for more information. Not me manifesting a non-NULL return for you tho πβ¨
π§ THREAD SAFETY π§
This function should be called on the thread that created the device. Like, don't be messy about it β same thread, same energy, no side quests. π₯
β AVAILABILITY β
This function is available since SDL_ttf 3.0.0. She's been here, she's established, she ate. π
π SEE ALSO π
β’(3)TTF_CreateGPUTextEngine(3)β’(3)TTF_DestroyGPUTextEngine(3)β’(3)TTF_GetGPUTextDrawData(3)
iykyk π
SDL_ttf β SDL_ttf 3.2.2 β mwah, that's a wrap bestie, go make something iconic with your GPU text engine πππ«Ά
π¦ where this page comes from
- debian trixie: libsdl3-ttf-doc 3.2.2+ds-1 Β· Zlib
- fedora 43: SDL3_ttf-devel 3.2.2-2.fc43 Β· Zlib AND MIT
- fedora 43: SDL3_ttf-devel 3.2.2-2.fc43 Β· Zlib AND MIT
- fedora 44: SDL3_ttf-devel 3.2.2-4.fc44 Β· Zlib AND MIT
- fedora 44: SDL3_ttf-devel 3.2.2-4.fc44 Β· Zlib AND MIT
- ubuntu questing: libsdl3-ttf-doc 3.2.2+ds-1
- ubuntu resolute: libsdl3-ttf-doc 3.2.2+ds-1build1 Β· Zlib
- ubuntu stonking: libsdl3-ttf-doc 3.2.2+ds-2 Β· Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms