TTF_GetGlyphScript(3)
π TTF_GetGlyphScript β NAME π
okay so bestie, this is TTF_GetGlyphScript from the SDL_ttf3 functions. It tells you which script a 32-bit codepoint belongs to. that's it, that's the whole job. she's simple, she's iconic. β¨
π HEADER FILE π
she lives in SDL3_ttf/SDL_ttf.h β defined there and everything, no cap.
π¦ SYNOPSIS π¦
#include "SDL3_ttf/SDL_ttf.h"
Uint32 TTF_GetGlyphScript(Uint32 ch);
πΈ FUNCTION PARAMETERS πΈ
chβ the character code you wanna check. just hand her the codepoint and she'll go look. π«Ά
β¨ RETURN VALUE β¨
on success she hands you back an ISO 15924 code β that's the fancy international standard for naming scripts. the full list lives over here: https://unicode.org/iso15924/iso15924-codes.html
on failure you get 0. and like, zero is also a valid-looking number so don't be fooled β if you get a 0, go call SDL_GetError() for the tea on what actually went wrong. π
fr fr, always check the error. the function will not text you back, but SDL_GetError() will.
π₯ THREAD SAFETY π₯
this function is thread-safe. call her from anywhere, from any thread, she does not care, she is unbothered. main character energy only. π
π AVAILABILITY π
available since SDL_ttf 3.0.0. if you're on something older, sorry babe, she doesn't exist yet. π
π SEE ALSO π
β’(3)TTF_TagToString(3)
and that's the whole page, bestie! this was from the SDL_ttf manual, version 3.2.2 β go forth and script-check your codepoints, you absolute legend π¦π periodt β¨
π¦ 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