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 π
β’(3)TTF_TagToString(3)
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
- 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