ttfGetFontSdf function

bool ttfGetFontSdf(
  1. Pointer<TtfFont> font
)

Query whether Signed Distance Field rendering is enabled for a font.

\param font the font to query

\returns SDL_TRUE if enabled, SDL_FALSE otherwise.

\since This function is available since SDL_ttf 2.0.18.

\sa TTF_SetFontSDF

extern DECLSPEC SDL_bool TTF_GetFontSDF(const TTF_Font *font)

Implementation

bool ttfGetFontSdf(Pointer<TtfFont> font) {
  final ttfGetFontSdfLookupFunction = libSdl2Ttf.lookupFunction<
      Int32 Function(Pointer<TtfFont> font),
      int Function(Pointer<TtfFont> font)>('TTF_GetFontSDF');
  return ttfGetFontSdfLookupFunction(font) == 1;
}