TTF_SetFontLineSkip(3)
β¨ TTF_SetFontLineSkip(3) β¨
okay bestie, welcome to the SDL_ttf3 FUNCTIONS corner of the manual, where we're talking about TTF_SetFontLineSkip β the glow-up your line spacing has been waiting for π
π NAME π
TTF_SetFontLineSkip β set the spacing between lines of text for a font. that's it, that's the whole vibe. no cap. π
π HEADER FILE π
lowkey important, don't skip this part:
Defined in SDL3_ttf/SDL_ttf.h
π¦ SYNOPSIS π¦
here's the whole thing, character for character, because we do NOT play with our includes:
#include "SDL3_ttf/SDL_ttf.h"
void TTF_SetFontLineSkip(TTF_Font *font, int lineskip);
she takes a font, she takes an int, she returns nothing. minimalist queen. periodt. π
π DESCRIPTION π
so basically: this updates any TTF_Text objects using this font. like, all of them. they get the memo. instantly. no group chat needed, they just know. β¨
πΈ FUNCTION PARAMETERS πΈ
let's meet the cast π«Ά
fontβ the font to modify. the main character, obviously. πlineskipβ the new line spacing for the font. how much breathing room each line gets. give her space, she deserves it. π
π§΅ THREAD SAFETY π§΅
β οΈ this function should be called on the thread that created the font. not a different thread. not your friend's thread. the thread. don't be messy about it bestie, it's giving undefined behaviour energy and we do not want that. π
ποΈ AVAILABILITY ποΈ
This function is available since SDL_ttf 3.0.0. so if you're on anything older... girly, upgrade. π
π SEE ALSO π
go read the sibling, they're iconic together:
β’(3)TTF_GetFontLineSkip(3)β the reader, the getter, the one who asks instead of tells π
and that's the whole page!! π¦ stay spaced out (affectionately), and remember: every line deserves its own little room to breathe πβ¨
β xoxo, the SDL_ttf manual, version SDL_ttf 3.2.2, dropping knowledge and slaying since forever. bye bestie!! π
ππ
π¦ 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