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 πŸ‘€


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