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 true if enabled, false otherwise.

\threadsafety It is safe to call this function from any thread.

\since This function is available since SDL_ttf 3.0.0.

\sa TTF_SetFontSDF

extern SDL_DECLSPEC bool TTF_GetFontSDF(const TTF_Font *font)

Implementation

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