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:


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