setSizeDpi method

bool setSizeDpi(
  1. double ptsize,
  2. int hdpi,
  3. int vdpi
)

Set font size dynamically with target resolutions, in dots per inch.

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. \param hdpi the target horizontal DPI. \param vdpi the target vertical DPI. \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 \sa TTF_GetFontSizeDPI

extern SDL_DECLSPEC bool SDLCALL TTF_SetFontSizeDPI(TTF_Font *font, float ptsize, int hdpi, int vdpi)

Implementation

bool setSizeDpi(double ptsize, int hdpi, int vdpi) {
  return ttfSetFontSizeDpi(this, ptsize, hdpi, vdpi);
}