TTF_GetFontDirection(3)

✨ TTF_GetFontDirection ✨

okay bestie, welcome to the SDL_ttf3 functions corner of the manual, this one's a little cutie called TTF_GetFontDirection πŸŽ€


πŸ’– NAME πŸ’–

TTF_GetFontDirection β€” get the direction to be used for text shaping by a font. no cap, that's literally its whole job πŸ¦‹


🌸 HEADER FILE 🌸

it lives in SDL3_ttf/SDL_ttf.h, so that's where you go looking when you need it πŸ’…


✨ SYNOPSIS ✨

#include "SDL3_ttf/SDL_ttf.h"

TTF_Direction TTF_GetFontDirection(TTF_Font *font);

πŸ¦‹ DESCRIPTION πŸ¦‹

so like, this hands you back the direction that's gonna be used for text shaping by that font.

and if nobody ever set one? it defaults to TTF_DIRECTION_INVALID πŸ’€ that's the fallback, that's what you get, no surprises.


🫢 FUNCTION PARAMETERS 🫢

  • font β€” the font to query. yes queen, just hand over the font and let her spill the tea πŸ’œ

πŸ‘‘ RETURN VALUE πŸ‘‘

returns a ( TTF_Direction ) β€” the direction to be used for text shaping. that's it, that's the whole vibe ✨


πŸ”₯ THREAD SAFETY πŸ”₯

this function should be called on the thread that created the font. like, same thread, bestie, don't be sneaky about it πŸ™ˆ

🌈 AVAILABILITY 🌈

this one's been around since SDL_ttf 3.0.0, so it's basically iconic at this point πŸ‘‘


and that's the whole page, mwah πŸ’‹ go shape some text, you're doing amazing sweetie 🧚

this was brought to you by SDL_ttf, version SDL_ttf 3.2.2 β€” catch you in the next manpage, bestie πŸ“πŸ’–

πŸ“¦ where this page comes from