TTF_GetTextEngine(3)

πŸ’– TTF_GetTextEngine(3) πŸ’–

okay bestie, welcome to the SDL_ttf3 FUNCTIONS corner of the man pages πŸŽ€ this one's short, sweet, and lowkey iconic. it's giving "getter function that just tells you the vibe." let's go ✨


🌸 NAME 🌸

TTF_GetTextEngine β€” get the text engine used by a text object.

like. which engine is this text riding with. that's the whole question. πŸš—πŸ’¨


πŸ¦‹ HEADER FILE πŸ¦‹

Defined in SDL3_ttf/SDL_ttf.h

include it or you literally cannot pass go, no cap πŸ’…


✨ SYNOPSIS ✨

#include "SDL3_ttf/SDL_ttf.h"

TTF_TextEngine * TTF_GetTextEngine(TTF_Text *text);

one function. one argument. one return. chef's kiss 🫢


πŸŽ€ FUNCTION PARAMETERS πŸŽ€

  • text β€” the TTF_Text to query. 🧚 like, hand me the text object and i'll tell you which engine it's running with, bestie.

πŸ’œ RETURN VALUE πŸ’œ

returns a ( TTF_TextEngine * ) β€” specifically, the TTF_TextEngine used by the text on success, or NULL on failure. 😭

and if it fails? call SDL_GetError() for more information, because the function itself will not be explaining anything. the error string is the main character there, periodt.


πŸ”₯ THREAD SAFETY πŸ”₯

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

not me stressing this but fr fr β€” same thread that made the text, or it's giving chaos. πŸ™ˆ

🌈 AVAILABILITY 🌈

This function is available since SDL_ttf 3.0.0. so if you're on anything older, it's not there, sorry babe πŸ’€


πŸ‘‘ SEE ALSO πŸ‘‘

  • β€’(3) β€” yeah it's just a lone bullet with a (3) on it in the source, sitting there with main character energy and zero context πŸ’… we respect it, we preserve it, we move on.
  • TTF_SetTextEngine(3) β€” the setter to this getter. the other half of the duo. obsessed. 🫢

and that's the whole page, bestie, you ate it up ⭐ this one shipped with SDL_ttf version 3.2.2 β€” mwah, go query some text engines πŸ’–πŸ¦‹βœ¨

πŸ“¦ where this page comes from