personal website of James Turk, a developer in Washington, DC
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.
The latest release of GLFT_Font should always be available here. Source is on github. At the moment the latest version is 0.2.2.
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);
...
GLFT_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. As of 0.2 GLFT_Font allows outputting text via C++ style stream operators.
James Turk is a 23 year old currently living in Washington, DC working for Sunlight Labs. This site is a place for my projects and thoughts on politics, science, development, or whatever I happen to be thinking about.
content © James Turk — cc-by unless otherwise noted