Bitmap fonts & bitmap font generators (SOLVED)

Started by
9 comments, last by cozman 18 years, 10 months ago
I found a guy who wrote his own font generator using FreeType that was extremely simple fonttool. I decided to adapt this to cut out the middle step, which resulted in an extremely simple but somewhat useful class. I've released my work as GLFT_Font.

It's extremely easy to use:
#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");


It's open source and BSD-licensed, any improvements/bug-fixes/suggestions would be greatly appreciated. I think it's about time that there is a simple method for rendering TTF files under OpenGL.

(By the way, it's just as fast at rendering as bitmap fonts. Essentially all this does is generate then load a bitmap font.)

This topic is closed to new replies.

Advertisement