A generic font caching C library with loading and rendering support for SDL.
Clone or download
grimfang4 Merge pull request #27 from mnabakker/master
Fix for rendering to textures with SDL_Renderer.
Latest commit 0860d73 Jan 14, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
test Adjusted SDL_gpu rect in test program. Jun 1, 2016
LICENSE Initial commit Apr 6, 2015
README.md Update README.md Oct 9, 2017
SDL_FontCache.c Merge remote-tracking branch 'upstream/master' Jan 14, 2019
SDL_FontCache.h Added FC_GetBounds() and FC_GetWrappedText(). Dec 31, 2018
TODO.md Updated TODO.md Jun 1, 2015

README.md

SDL_FontCache

A generic font caching C library with loading and rendering support for SDL.

SDL_FontCache loads, caches, and renders TrueType fonts using SDL_ttf.
It fully supports UTF-8 strings and includes some utility functions for manipulating them.

An example using SDL_Renderer:

FC_Font* font = FC_CreateFont();  
FC_LoadFont(font, renderer, "fonts/FreeSans.ttf", 20, FC_MakeColor(0,0,0,255), TTF_STYLE_NORMAL);  

...

FC_Draw(font, renderer, 0, 0, "This is %s.\n It works.", "example text"); 
 
...

FC_FreeFont(font);