ttfGetFontScript function ttf

int ttfGetFontScript(
  1. Pointer<TtfFont> font
)

Get the script used for text shaping a font.

\param font the font to query. \returns an ISO 15924 code or 0 if a script hasn't been set.

\threadsafety This function should be called on the thread that created the font.

\since This function is available since SDL_ttf 3.0.0.

\sa TTF_TagToString

extern SDL_DECLSPEC Uint32 SDLCALL TTF_GetFontScript(TTF_Font *font)

Implementation

int ttfGetFontScript(Pointer<TtfFont> font) {
  final ttfGetFontScriptLookupFunction = _libTtf
      .lookupFunction<
        Uint32 Function(Pointer<TtfFont> font),
        int Function(Pointer<TtfFont> font)
      >('TTF_GetFontScript');
  return ttfGetFontScriptLookupFunction(font);
}