GLFT_Font

About GLFT_Font

GLFT_Font is originally by James Turk although it is based on the work of Marijn Haverbeke. GLFT_Font allows programmers to use fonts in their OpenGL applications with great ease on any platform for which both FreeType2 and OpenGL are available.

Obtaining GLFT_Font

The latest copy of GLFT_Font will be available via this website. At the moment the latest version is 0.1.

Using GLFT_Font

Using GLFT_Font is designed to be extremely simple. The simplest use is:


#include "GLFT_Font.h"

...
glEnable(GL_TEXTURE_2D);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
...
Font fnt("somefont.ttf", size);  
...
fnt.drawText(x, y, "Hello World");

GLFT_Font also includes support for finding the width/height of a string and drawText supports printf-style argument formatting.

Changelog


$Id: index.html,v 1.1 2005/07/18 22:19:16 cozman Exp $