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
- 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