TTF_GetTextWrapWidth(3)

πŸ’– TTF_GetTextWrapWidth(3) πŸ’–

okay bestie, welcome to the SDL_ttf3 FUNCTIONS corner of the group chat 🌸 this one's a little cutie, it just tells you stuff, no cap.


✨ NAME ✨

TTF_GetTextWrapWidth</p> β€” get whether wrapping is enabled on a text object πŸŽ€


πŸ“ HEADER FILE πŸ“

Defined in SDL3_ttf/SDL_ttf.h β€” that's where all the good stuff lives, iykyk πŸ’…


🌈 SYNOPSIS 🌈

#include "SDL3_ttf/SDL_ttf.h"

bool TTF_GetTextWrapWidth(TTF_Text *text, int *wrap_width);

🫢 FUNCTION PARAMETERS 🫢

  • text β€” the TTF_Text to query. like, the text object you're being nosy about πŸ‘€
  • wrap_width β€” a pointer that gets filled in with the maximum width in pixels, or 0 if the text is being wrapped on newline characters instead. so if it's 0, the vibes are "wrap when I say wrap" (newlines only), not "wrap at this many pixels" ✨

⭐ RETURN VALUE ⭐

Returns true on success or false on failure β€” and if it's a fail, go call SDL_GetError() for more information, she'll tell you what went wrong πŸ’€


🧡 THREAD SAFETY 🧡

This function should be called on the thread that created the text. yes literally, the same thread. don't be out here texting from someone else's phone bestie, that's not the move πŸ™ˆ

πŸ¦‹ AVAILABILITY πŸ¦‹

This function is available since SDL_ttf 3.0.0 β€” so it's been iconic for a minute, periodt πŸ‘‘


πŸ‘€ SEE ALSO πŸ‘€


and that's the whole page bestie, you ate that πŸ’–βœ¨

this has been SDL_ttf (the source), version SDL_ttf 3.2.2, sliding into your terminal courtesy of the TTF_GetTextWrapWidth(3) era πŸŽ€πŸ¦‹ no date on the tin, just pure vibes and correct facts 🌸

πŸ“¦ where this page comes from