TTF_GetFontScript(3)

πŸ’– TTF_GetFontScript(3) πŸ’–

okay bestie, welcome to the SDL_ttf3 FUNCTIONS corner of the manual, this one's short and sweet and lowkey adorable πŸŽ€

✨ NAME ✨

TTF_GetFontScript β€” get the script used for text shaping a font. that's it, that's the whole vibe πŸ¦‹

🌸 HEADER FILE 🌸

Defined in SDL3_ttf/SDL_ttf.h. yes you have to include it, no you can't skip it, periodt πŸ’…

✨ SYNOPSIS ✨

#include "SDL3_ttf/SDL_ttf.h"

Uint32 TTF_GetFontScript(TTF_Font *font);

look at her. one function. one argument. absolutely iconic πŸ‘‘

🫢 FUNCTION PARAMETERS 🫢

  • font β€” the font to query. like, the actual font you wanna know about. hand her over πŸ’œ

🌈 RETURN VALUE 🌈

She returns an ISO 15924 code β€” that's the fancy Unicode script-code thing, the one that lives here:

https://unicode.www:lenstrwww:splitstr:nwww:splitstr:r[char46]org/iso15924/iso15924-codes.www:lenstrwww:splitstr:nwww:splitstr:r[char46]html

or 0 if a script hasn't been set. so if you get 0 back, that's the "nobody set this yet bestie" signal, no cap πŸ™ˆ

πŸ’€ THREAD SAFETY πŸ’€

This function should be called on the thread that created the font. fr fr, don't go calling her from some random other thread, that's not the move 😭

⭐ AVAILABILITY ⭐

This function is available since SDL_ttf 3.0.0. so if you're on something older… girl. upgrade. it's giving ancient history 🧚

πŸŽ€ SEE ALSO πŸŽ€


and that's the whole page!! πŸ’– this was written up in the SDL_ttf 3.2.2 era of the SDL_ttf manual, so like… that's the version, that's the source, mwah, slay, bye bestie πŸ¦‹βœ¨πŸ“

πŸ“¦ where this page comes from