Easy font rendering in OpenGL

It’s surprising to what degree you are expected to bloat your code base, executable size and/or dependencies when you just want some decent true type font rendering in a cross-platform OpenGL application. Thankfully, Sean Barrett wrote the wonderful stb_truetype.h (and released it to the public domain no less!), which solves the problem in a single (under 2000 line) header file you can just drop into your project.

If you don’t want Visual Studio 11′s debugger to throw you out due to uninitialized values, replace line 1038 in that file with

It should have previously been

By the way, his site also hosts a great and similarly easy to use image reading/writing library.