ttfGetFontGeneration function

int ttfGetFontGeneration(
  1. Pointer<TtfFont> font
)

Get the font generation.

The generation is incremented each time font properties change that require rebuilding glyphs, such as style, size, etc.

\param font the font to query. \returns the font generation or 0 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 Uint32 SDLCALL TTF_GetFontGeneration(TTF_Font *font)

Implementation

int ttfGetFontGeneration(Pointer<TtfFont> font) {
  final ttfGetFontGenerationLookupFunction = libSdl3Ttf.lookupFunction<
      Uint32 Function(Pointer<TtfFont> font),
      int Function(Pointer<TtfFont> font)>('TTF_GetFontGeneration');
  return ttfGetFontGenerationLookupFunction(font);
}