TTF_GetTextProperties(3)

πŸ’– TTF_GetTextProperties(3) πŸ’–

okay bestie, welcome to the SDL_ttf3 FUNCTIONS corner of the internet ✨ this one's short, sweet, and lowkey kinda powerful.


🌸 NAME 🌸

TTF_GetTextProperties β€” she gets the properties that are associated with a text object, periodt πŸ’…


πŸŽ€ HEADER FILE πŸŽ€

she lives in SDL3_ttf/SDL_ttf.h, no cap. include her or she's not showing up to the party 🫢


✨ SYNOPSIS ✨

#include "SDL3_ttf/SDL_ttf.h"

SDL_PropertiesID TTF_GetTextProperties(TTF_Text *text);

πŸ¦‹ FUNCTION PARAMETERS πŸ¦‹

  • text β€” the TTF_Text you wanna query. like, the text object in question, the one you're asking about πŸ‘€

πŸ’œ RETURN VALUE πŸ’œ

on success she hands you a valid property ID ✨ and on failure you get 0 😭 if you got that zero, call SDL_GetError() for more info, she'll tell you what went wrong fr fr.


🧚 THREAD SAFETY 🧚

ngl this one's important: call this function on the thread that created the text. same thread, bestie. don't be out here crossing threads, it's giving chaos 🌈


πŸ‘‘ AVAILABILITY πŸ‘‘

this icon has been serving since SDL_ttf 3.0.0 πŸ’…


and that's the whole page, bestie!! short queen, but she ate πŸ“

this lil' writeup ships with SDL_ttf 3.2.2, mwah πŸ’‹ go query some properties, you got this 🫢✨

πŸ“¦ where this page comes from