TTF_GetFontDescent(3)
π TTF_GetFontDescent(3) π
okay bestie, welcome to the SDL_ttf3 FUNCTIONS corner of the manual, where we're talking about TTF_GetFontDescent β the lil function that tells you how far down a font dips from the baseline. yes it's negative. yes that's on purpose. let's get into it π¦
πΈ NAME πΈ
TTF_GetFontDescent β query the offset from the baseline to the bottom of a font.
like, the bottom-bottom. the underhang. the lil bit that hangs below the line β¨
π HEADER FILE π
defined in SDL3_ttf/SDL_ttf.h
β¨ SYNOPSIS β¨
#include "SDL3_ttf/SDL_ttf.h"
int TTF_GetFontDescent(const TTF_Font *font);
π DESCRIPTION π
so here's the tea: this is a negative value, relative to the baseline. that's the whole vibe. it's not a bug, it's not a glitch, it's just how descent math works β down is negative, periodt π
π«Ά FUNCTION PARAMETERS π«Ά
fontβ the font to query. (the one you're being nosy about π)
β RETURN VALUE β
returns the font's descent. that's it, that's the answer, no cap π
π§ THREAD SAFETY π§
it is safe to call this function from any thread. go wild, queen β multithreaded font interrogation is fully on the table π₯
π AVAILABILITY π
this function is available since SDL_ttf 3.0.0. so if you're on anything older... bestie, upgrade π
mwah π that's the whole page. go measure your fonts, you icon.
source: SDL_ttf, version 3.2.2 β from the SDL_ttf manual, and yeah, this whole thing is TTF_GetFontDescent(3) πβ¨π
π¦ 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