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 πŸ’œ


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