SDL_TTF_VERSION_ATLEAST(3)

✨ SDL_TTF_VERSION_ATLEAST ✨

okay bestie, welcome to the SDL_ttf3 FUNCTIONS corner of the manual πŸ’– this one's a macro, she's short, she's sweet, she's literally just a vibe check for your compile-time version. no cap.


🌸 NAME 🌸

SDL_TTF_VERSION_ATLEAST β€” this macro will evaluate to true if compiled with SDL_ttf at least X.Y.Z. that's it. that's the whole girl. πŸ’…


πŸŽ€ HEADER FILE πŸŽ€

she lives here, bestie, don't lose her:

  • Defined in SDL3_ttf/SDL_ttf.h

πŸ¦‹ SYNOPSIS πŸ¦‹

pull her in like this:

#include "SDL3_ttf/SDL_ttf.h"

and here's the macro in all her glory β€” copying this exactly, character for character, because we do not freestyle with preprocessor definitions:

#define SDL_TTF_VERSION_ATLEAST(X, Y, Z) .BI ((SDL_TTF_MAJOR_VERSION>=X)&&.BI     (SDL_TTF_MAJOR_VERSION > X || SDL_TTF_MINOR_VERSION >= Y) && .BI (SDL_TTF_MAJOR_VERSION>X||SDL_TTF_MINOR_VERSION>Y||SDL_TTF_MICRO_VERSION>=Z))
ok so real talk: those .BI bits in there are troff formatting noise that leaked into the definition in the manpage source, and I am not allowed to clean them up for you. copy with your eyes open, babes. πŸ‘€

πŸ’œ the vibe, explained πŸ’œ

you feed her three numbers β€” X, Y, Z β€” and she checks the version you're actually compiled against. she peeks at SDL_TTF_MAJOR_VERSION, SDL_TTF_MINOR_VERSION, and SDL_TTF_MICRO_VERSION to do it. if your SDL_ttf is at least that version, she evaluates to true. if not, false. iconic. 🫢

use her for guarding code that needs a newer SDL_ttf so it doesn't explode on older builds. main character energy, truly.


🌈 that's a wrap 🌈

this page came to you from SDL_ttf 3.2.2 (SDL_ttf version 3, specifically), and yes she's filed under SDL_TTF_VERSION_ATLEAST(3). go forth and version-check responsibly, my love πŸŽ€βœ¨πŸ’–

πŸ“¦ where this page comes from