# lwjgl and slick util text over textured quad

So, I load a TrueTypeFont like this:

   private TrueTypeFont trueTypeFont;
try {

Font awtFont2 = Font.createFont(Font.TRUETYPE_FONT, inputStream);
awtFont2 = awtFont2.deriveFont(24f); // set font size
trueTypeFont = new TrueTypeFont(awtFont2, true);

} catch (Exception e) {
e.printStackTrace();
}


After that, I draw a textured quad, as one usualyy would and then, draw trueTypeFont.drawString(this.x, this.y, this.text, Color.white); . What this gives, however is far from text, this is what it does, the black is supposed to be text...

How to fix?

You get the black boxes because you have to enable blending in OpenGL:

glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);


This because the textures drawn by Slick have transparency.

• K, that causes puu.sh/aA554/09203ae10e.png ... the small black thingy I recognize as a part of the sprite sheet, I texturized the quad with... do I need to un-bind the texture somehow? – Rando Hinn Aug 1 '14 at 11:06
• Or what should I do? – Rando Hinn Aug 1 '14 at 19:36
• Hmm weird. You might have forgotten to enable something / loaded a texture. Check this page, it has everything you need: goo.gl/GuD35y – Basaa Aug 2 '14 at 16:08
• Got it fixed, part of the fix included this. Approved – Rando Hinn Aug 3 '14 at 8:13
• @RandoHinn So what was the fix of the problem where you've got pieces of other texture? – polkovnikov.ph Aug 6 '17 at 20:37