TTF_SetFontWrapAlignment(3)
π TTF_SetFontWrapAlignment(3) π
okay bestie, welcome to the SDL_ttf3 FUNCTIONS corner of the manual, where we set a font's current wrap alignment option and then go about our day looking gorgeous β¨
πΈ NAME πΈ
TTF_SetFontWrapAlignment β set a font's current wrap alignment option. that's it. that's the whole job. iconic of her honestly π
π HEADER FILE π
it lives in SDL3_ttf/SDL_ttf.h, bestie. that's where all the good stuff is π¦
β¨ SYNOPSIS β¨
#include "SDL3_ttf/SDL_ttf.h"
void TTF_SetFontWrapAlignment(TTF_Font *font, TTF_HorizontalAlignment align);
look at that signature. so clean. so slay π
π DESCRIPTION π
so here's the tea: this function sets the wrap alignment option on your font. and the important part β it updates any TTF_Text objects using this font. like, all of them. immediately. no cap. so if you've got text already living its life out there, it gets the new alignment vibe too π«Ά
π FUNCTION PARAMETERS π
fontβ the font you're setting a new wrap alignment option on. yes, this one. the font right here πalignβ the new wrap alignment option. the glow-up itself β¨
π§΅ THREAD SAFETY π§΅
okay listen, this is the part where you have to behave: this function should be called on the thread that created the font. don't be texting the font from some other thread, she will not answer. main character energy only on the thread that made her π
π¦ AVAILABILITY π¦
this function has been available since SDL_ttf 3.0.0. she's been around. she's a veteran. respect her π
π SEE ALSO π
β’(3)TTF_GetFontWrapAlignment(3)β the one that reads the alignment back, iykyk π
and that's the whole page, bestie!! this little writeup is brought to you by SDL_ttf, version 3.2.2 β go forth, align your wraps, and stay on the thread that made your font πβ¨ππ¦πΈπ π«Ά
π¦ 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