BitmapText transparency?

For some reason I cannot seem to get those black corners removed from my bitmaptext.

The best result i've gotten doesn't have any black corners except the text becomes transparent in the brighter parts of my scene (see image).

Here is my current code:

BlendState as1 = DisplaySystem.getDisplaySystem().getRenderer().createBlendState();

        BitmapFont fnt = BitmapFontLoader.loadDefaultFont();

        BitmapText txt = new BitmapText(fnt, false);
        txt.setLocalTranslation(25, 300, 0);


hi, first I think you don't need to set a BlendState, the text has one. Second, you have the wrong DestinationFunction, it should be:



when i set that destination function i get this. I also get the same result if i remove the blend state.

any other suggestions on what to do to get rid of the black ?  :?

hi, yes, that is the correct blendstate function.

Call txt.update(); before txt.updateRenderState();

that made no difference…  :expressionless:

damn, then it must be something on the higher-up nodes which you attach the text so. Otherwise the code above but without the BlendState should work. Which RenderStates do you have attached to any parent Nodes?

Maybe the font doesn't have an alpha channel?

maybe that is the problem, but im stuck on one thing while loading my own font:

URL fontFile =
                 URL textureFile =
BitmapFont fnt = BitmapFontLoader.load(textureFile,

This is in the testBitmapFont. I'm wondering what is the difference between textureFile and fontFile.
I have a single png file for the font. How can i load it? Also, what formats does it support?
Momoko_Fan said:

Maybe the font doesn't have an alpha channel?

Nope, he uses the default font from the test package, which works fine.

@satrix: for each BitmapFont you need 2 files:
- a .fnt file that describes the font (texture space per character, kerning, etc.). This is a normal text file
- a texture file that has all the characters on it and it must match the .fnt files description. This image can have any format jme supports for textures.

EDIT: take a look at this tool:

thanks for your help and suggestions guys, I created my own font with the font editor and the blending worked!  :smiley:

not sure why the default font doesn't work though.