Registry / other / sdl2-ttf

sdl2-ttf

JSON →
library2.24.0vcpkgunverified

A library for rendering TrueType fonts with SDL

vcpkg install sdl2-ttf
INSTALL
IMPORT
SIG · SDL2-TTF
S
sdl2-ttf
othercppv2.24.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SDL2/SDL_ttf.h
#include <SDL2/SDL_ttf.h>

Render text to a surface using SDL2_ttf

#include <SDL2/SDL.h> #include <SDL2/SDL_ttf.h> int main() { TTF_Init(); TTF_Font *font = TTF_OpenFont("font.ttf", 24); SDL_Color color = {255, 255, 255}; SDL_Surface *surface = TTF_RenderText_Solid(font, "Hello", color); TTF_CloseFont(font); TTF_Quit(); return 0; }
Debug
Known issues
gotchaSDL2_ttf requires SDL2; ensure SDL2 is linked.
fix
Add sdl2 to your vcpkg dependencies and link both SDL2 and SDL2_ttf.
affects: *
Upgrade
Version history
2.24.0latest on vcpkg
Audit
Dependencies

No dependency data recorded yet.

Agent activity
14 hits · last 30 days
node
14
Resources

No resource links recorded.

sdl2-ttf — pip install sdl2-ttf · libregistry