ttfSetTextScript function ttf
Set the script to be used for text shaping a text object.
This returns false if SDL_ttf isn't built with HarfBuzz support.
\param text the text to modify. \param script an ISO 15924 code . \returns true on success or false on failure; call SDL_GetError() for more information.
\threadsafety This function should be called on the thread that created the text.
\since This function is available since SDL_ttf 3.0.0.
\sa TTF_StringToTag
extern SDL_DECLSPEC bool SDLCALL TTF_SetTextScript(TTF_Text *text, Uint32 script)
Implementation
bool ttfSetTextScript(Pointer<TtfText> text, int script) {
final ttfSetTextScriptLookupFunction = _libTtf
.lookupFunction<
Uint8 Function(Pointer<TtfText> text, Uint32 script),
int Function(Pointer<TtfText> text, int script)
>('TTF_SetTextScript');
return ttfSetTextScriptLookupFunction(text, script) == 1;
}