TTF_CREATERENDERERTEXTENGINEWITHPROPERTIES(3)
π NAME π
TTF_CreateRendererTextEngineWithProperties β bestie, this is the one that creates a text engine for drawing text on an SDL renderer, and you get to hand it a lil' bag of properties to customize it. So it's the "make me a text engine, but my way" function. β¨
π HEADER FILE π
It lives in SDL3_ttf/SDL_ttf.h, okurrr.
πΈ SYNOPSIS πΈ
#include "SDL3_ttf/SDL_ttf.h"
TTF_TextEngine * TTF_CreateRendererTextEngineWithProperties(SDL_PropertiesID props);
#define TTF_PROP_RENDERER_TEXT_ENGINE_RENDERER SDL_ttf.renderer_text_engine.create.renderer"
#define TTF_PROP_RENDERER_TEXT_ENGINE_ATLAS_TEXTURE_SIZE SDL_ttf.renderer_text_engine.create.atlas_texture_size"
Yes those two #defines are property-name macros and yes you pass them through props. Iconic behavior honestly.
β¨ DESCRIPTION β¨
Okay so here's the tea β β these are the properties that are supported:
TTF_PROP_RENDERER_TEXT_ENGINE_RENDERERβ the renderer you wanna use for creating textures and drawing text. Like, the actual SDL renderer. Required vibes-wise, obviously.TTF_PROP_RENDERER_TEXT_ENGINE_ATLAS_TEXTURE_SIZEβ the size of the texture atlas. Yes bestie, there's an atlas. It's a texture atlas. It holds your glyphs. π¦
π«Ά FUNCTION PARAMETERS π«Ά
propsβ the properties to use. That's it. That's the whole arg. Slay.
π RETURN VALUE π
Returns a TTF_TextEngine object on success, or NULL on failure. And when it fails? Call SDL_GetError() for more info, because we do NOT do mystery errors in this house. π
π THREAD SAFETY π
Not me having to say this, but: this function should be called on the thread that created the renderer. Same thread, bestie. Don't get cute with it. π
π AVAILABILITY π
This function has been available since SDL_ttf 3.0.0. So if you're on something older... it's giving vintage, and not in the good way. π
β SEE ALSO β
And that's the whole page, fr fr. This gem comes to you courtesy of SDL_ttf, version 3.2.2 β go forth and render some text, you absolute main character. ππβ¨
π¦ 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