TTF_CopyFont(3)
β¨ TTF_CopyFont(3) β¨
okay bestie, welcome to the SDL_ttf3 FUNCTIONS corner of the manual, you're gonna love it here π«Ά
π NAME π
TTF_CopyFont β make a whole entire copy of a font you already have. it's giving "twin but not identical" π
πΈ HEADER FILE πΈ
she lives in SDL3_ttf/SDL_ttf.h, no cap β¨
π SYNOPSIS π
#include "SDL3_ttf/SDL_ttf.h"
TTF_Font * TTF_CopyFont(TTF_Font *existing_font);
π¦ DESCRIPTION π¦
so the copy you get back is distinct from the original β like, separate entity, her own main character energy β BUT she shares the same font file, and she's got the exact same size and style as the original. same vibe, different girl. iconic π
when you're done with the TTF_Font she hands you, use
TTF_CloseFont()
to dispose of it. don't just leave her hanging, that's rude π
π FUNCTION PARAMETERS π
existing_fontβ the font you wanna copy. the original. the blueprint. the moment π
β RETURN VALUE β
(TTF_Font *) β returns a valid TTF_Font, or NULL on failure. and if it's NULL? call SDL_GetError() for more info, she'll tell you what went wrong π
π§ THREAD SAFETY π§
this function should be called on the thread that created the original font. same thread, always. don't be messy about it π«π§΅
πΈ AVAILABILITY πΈ
available since SDL_ttf 3.0.0, so she's been around, she's established, she's got seniority π
π₯ SEE ALSO π₯
β’(3)TTF_CloseFont(3)
okay that's the whole page bestie, go forth and copy fonts responsibly πβ¨
sending you off with love from the SDL_ttf manual, version SDL_ttf 3.2.2 β mwah, xoxo ππ¦
π¦ 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