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 πŸ”₯


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