TTF_GetFreeTypeVersion(3)

πŸ’– TTF_GetFreeTypeVersion(3) πŸ’–

okay bestie, so this is a page from the SDL_ttf3 FUNCTIONS manual, and today's main character is TTF_GetFreeTypeVersion. Let's get into it ✨


🌸 NAME 🌸

TTF_GetFreeTypeVersion β€” the lil function that lets you query the version of the FreeType library you're currently using. fr, that's it, that's the whole vibe πŸ¦‹


πŸŽ€ HEADER FILE πŸŽ€

It lives in SDL3_ttf/SDL_ttf.h, no cap.


✨ SYNOPSIS ✨

#include "SDL3_ttf/SDL_ttf.h"

void TTF_GetFreeTypeVersion(int *major, int *minor, int *patch);

look at her. gorgeous. iconic. three lil pointers and she's done πŸ’…


πŸ’œ DESCRIPTION πŸ’œ

so basically, you gotta call TTF_Init () before you call this function. like, that's the prerequisite, bestie, don't skip it πŸ™ˆ


πŸ“ FUNCTION PARAMETERS πŸ“

  • major β€” gets filled in with the major version number. and guess what? it can be NULL πŸ’«
  • minor β€” gets filled in with the minor version number. also can be NULL 🌸
  • patch β€” gets filled in with the param version number. yep, you heard me, and it can be NULL too πŸŽ€

🧚 THREAD SAFETY 🧚

she's safe to call from any thread. multithreaded queen behavior, we love to see it πŸ‘‘


🌈 AVAILABILITY 🌈

this one's been around since SDL_ttf 3.0.0, so she's got history ✨


πŸ‘‘ SEE ALSO πŸ‘‘


lowkey important reminder: TTF_Init() first, version query second. that's the order, periodt πŸ’…

that's the whole page, bestie!! mwah 🫢 this was pulled straight from the SDL_ttf 3.2.2 manual β€” stay slaying, and may your pointers never be NULL unless you want them to be πŸ’–πŸŒŸπŸŽ€

πŸ“¦ where this page comes from