setSize method

bool setSize(
  1. double ptsize
)

Set a font's size dynamically.

This updates any TTF_Text objects using this font, and clears already-generated glyphs, if any, from the cache.

\param font the font to resize. \param ptsize the new point size. \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.

\sa TTF_GetFontSize

extern SDL_DECLSPEC bool SDLCALL TTF_SetFontSize(TTF_Font *font, float ptsize)

Implementation

bool setSize(double ptsize) {
  return ttfSetFontSize(this, ptsize);
}