TTF_SetFontSize(3)
π TTF_SetFontSize β bestie's guide to glow-ups for your font π
okay so this is a page from the SDL_ttf3 FUNCTIONS manual, and the star of the show is TTF_SetFontSize(3). it's giving "make my text bigger, make it smaller, make it a whole new vibe" and honestly? obsessed. β¨
πΈ NAME πΈ
TTF_SetFontSize β change a font's size on the fly, like a β¨dynamicβ¨ little glow-up. no cap.
π HEADER FILE π
it lives in SDL3_ttf/SDL_ttf.h, bestie. that's the address. π
β¨ SYNOPSIS β¨
#include "SDL3_ttf/SDL_ttf.h"
bool TTF_SetFontSize(TTF_Font *font, float ptsize);
π¦ DESCRIPTION π¦
so like, when you call this, it updates literally every TTF_Text object that's out here using this font β they all get the new size, no one left behind π β and it clears already-generated glyphs, if any, from the cache. so the cache gets a little reset moment. it's fine. it's a vibe check. π₯
π FUNCTION PARAMETERS π
fontβ the font you're resizing. the main character, fr fr. πptsizeβ the new point size. the numbers. the drama. the slay. π
π RETURN VALUE π
returns true when it goes off without a hitch, and false when it does NOT. π if you get a false, go call SDL_GetError() for the tea β it'll tell you what went wrong.
π§ THREAD SAFETY π§
β οΈ bestie listen β call this on the thread that created the font. same thread, always. don't be texting from someone else's phone, okay? π
β AVAILABILITY β
this one's been around since SDL-ttf 3.0.0. iconic behavior, honestly. it's not new new, it's a classic. π«Ά
π SEE ALSO π
β’(3)TTF_GetFontSize(3)β the girl who tells you what size you're currently at π
and that's the whole page, no notes. πβ¨
mwah π this came from theSDL_ttfmanual, version SDL_ttf 3.2.2, and the page itself isTTF_SetFontSize(3). go forth and resize, my love. πΈππ¦
π¦ where this page comes from
- debian trixie: libsdl3-ttf-doc 3.2.2+ds-1 Β· Zlib
- fedora 43: SDL3_ttf-devel 3.2.2-2.fc43 Β· Zlib AND MIT
- fedora 43: SDL3_ttf-devel 3.2.2-2.fc43 Β· Zlib AND MIT
- fedora 44: SDL3_ttf-devel 3.2.2-4.fc44 Β· Zlib AND MIT
- fedora 44: SDL3_ttf-devel 3.2.2-4.fc44 Β· Zlib AND MIT
- ubuntu questing: libsdl3-ttf-doc 3.2.2+ds-1
- ubuntu resolute: libsdl3-ttf-doc 3.2.2+ds-1build1 Β· Zlib
- ubuntu stonking: libsdl3-ttf-doc 3.2.2+ds-2 Β· Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms