TTF_SetFontSizeDPI3
Set font size dynamically with target resolutions, in dots per inch.
Usage
#include "SDL3_ttf/SDL_ttf.h"
bool TTF_SetFontSizeDPI(TTF_Font *font, float ptsize, int hdpi, int vdpi);
Header file
Defined in SDL3_ttf/SDL_ttf.h
Overview
This updates any TTF_Text
objects using this font, and clears already-generated glyphs, if any, from the cache.
Function parameters
font
|
the font to resize. |
|---|---|
ptsize
|
the new point size. |
hdpi
|
the target horizontal DPI. |
vdpi
|
the target vertical DPI. |
Return value
Returns true on success or false on failure; call SDL_GetError() for more information.
Thread safety
This function should be called on the thread that created the font.