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β theTTF_Textto query. like, the text object you're being nosy about πwrap_widthβ a pointer that gets filled in with the maximum width in pixels, or0if the text is being wrapped on newline characters instead. so if it's0, 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 π
β’(3)TTF_SetTextWrapWidth(3)
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
- 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