TTF_WasInit(3)
β¨ TTF_WasInit β¨
okay bestie, welcome to the SDL_ttf3 FUNCTIONS corner of the group chat π this one's called TTF_WasInit and it's literally the vibe check for your font library.
πΈ NAME πΈ
TTF_WasInit β check if SDL_ttf is initialized.
π HEADER FILE π
Defined in SDL3_ttf/SDL_ttf.h, no cap.
π¦ SYNOPSIS π¦
#include "SDL3_ttf/SDL_ttf.h"
int TTF_WasInit(void);
π DESCRIPTION π
so basically? this function reports the number of times the library has been initialized by a call to TTF_Init(), without a paired deinitialization request from TTF_Quit(). like it's keeping receipts π
In short: if it's greater than zero, the library is currently initialized and ready to work. If it's zero, it is not initialized. that's it, that's the whole mood.
Despite the return value being a signed integer, this function should not return a negative number. she's not gonna go there, fr fr.
β RETURN VALUE β
Returns the current number of initialization calls, that need to eventually be paired with this many calls to TTF_Quit(). yes queen, every TTF_Init() needs its TTF_Quit() partner, it's giving balanced energy π«Ά
π THREAD SAFETY π
It is safe to call this function from any thread. main character energy, allowed everywhere π
π AVAILABILITY π
This function is available since SDL_ttf 3.0.0. vintage-ish but iconic.
π₯ SEE ALSO π₯
β’(3)TTF_Init(3)β’(3)TTF_Quit(3)
okay that's the whole page, bestie π go forth and initialize responsibly. this has been your girl reporting from SDL_ttf version 3.2.2, mwah π β¨
π¦ 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