setLanguage method

bool setLanguage(
  1. String? languageBcp47
)

Set language to be used for text shaping by a font.

If SDL_ttf was not built with HarfBuzz support, this function returns false.

This updates any TTF_Text objects using this font.

\param font the font to specify a language for. \param language_bcp47 a null-terminated string containing the desired language's BCP47 code. Or null to reset the value. \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 font.

\since This function is available since SDL_ttf 3.0.0.

extern SDL_DECLSPEC bool TTF_SetFontLanguage(TTF_Font *font, const char *language_bcp47)

Implementation

bool setLanguage(String? languageBcp47) {
  return ttfSetFontLanguage(this, languageBcp47);
}