Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17625

New C/C++ library: Font Chef

$
0
0

Hey all!

I'm releasing a new library, called Font Chef, to assist in text rendering. Its purpose is to create an atlas of selected glyphs from unicode blocks and produce source and target rectangles to clip and render the atlas into the screen. It is basically an abstraction of the great stb_truetype

It handles kerning, wrapping (line breaking) and alignment. It is also fully documented with examples and a manual.

Example for C:

fc_font * font = fc_construct(font_data, fc_px(30), fc_color_black);
fc_add(fc_basic_latin.start, fc_basic_latin.end);
fc_cook(font);
// use fc_get_pixels(font) to make a texture
    
const char hello[] = "Hello, world …

Viewing all articles
Browse latest Browse all 17625

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>