ttfSetFontSize function

int ttfSetFontSize(
  1. Pointer<TtfFont> font,
  2. int ptsize
)

Set a font's size dynamically.

This clears already-generated glyphs, if any, from the cache.

\param font the font to resize. \param ptsize the new point size. \returns 0 if successful, -1 on error

\since This function is available since SDL_ttf 2.0.18.

extern DECLSPEC int SDLCALL TTF_SetFontSize(TTF_Font *font, int ptsize)

Implementation

int ttfSetFontSize(Pointer<TtfFont> font, int ptsize) {
  final ttfSetFontSizeLookupFunction = libSdl2Ttf.lookupFunction<
      Int32 Function(Pointer<TtfFont> font, Int32 ptsize),
      int Function(Pointer<TtfFont> font, int ptsize)>('TTF_SetFontSize');
  return ttfSetFontSizeLookupFunction(font, ptsize);
}