This is my little library that allows you to draw fonts in LWJGL. It’s very small (only 114 LOC).
Here’s a screenshot of it drawing using the Sansation font:
http://puu.sh/9w4Ti/b16583ac37.png
Here’s the code itself: https://gist.github.com/Th0masR0ss/e9243290d1ea6459e03f
And here’s how to use it:
Constructors:
There are two constructors, [icode]FontUtil(java.awt.Font font, java.awt.Color color, boolean antiAliased)[/icode] and [icode]FontUtil(java.awt.Font font)[/icode].
[icode]FontUtil(java.awt.Font font, java.awt.Color color, boolean antiAliased)[/icode] will create a new FontUtil with the settings for the font you specified, the color you specified, and also if you want Anti Aliasing or not. You can change these settings later, see the Methods section.
[icode]FontUtil(java.awt.Font font)[/icode] will create a new FontUtil with the default settings: white color with anti aliasing on. You can change these settings later, see the Methods section.
Methods:
There are three methods.
[icode]FontUtil.setAA(boolean antiAliasing)[/icode] turns on or off Anti Aliasing based on the parameter you give it ([icode]true[/icode] is on, [icode]false[/icode] is off).
[icode]FontUtil.setColor(java.awt.Color color)[/icode] sets the color of the text to draw.
[icode]DrawString(String str, int x, int y)[/icode] actually draws the text. See the Drawing Text section.
Drawing Text
You draw text with the [icode]drawString(String str, int x, int y)[/icode] method. It accepts three arguments, which are pretty self-explanatory. [icode]str[/icode] is the [icode]String[/icode] to draw, and [icode]x[/icode] and [icode]y[/icode] is the position to draw at. For a full example, see the Example section below.
Example
There is a full example here.