UTF-8 text rendering

Hello 3D-boys.

I'm just learning jME, but I can't find any example of rendering UTF-8 text in jME ?

In JOGL I was using com.sun.opengl.util.j2d.TextRenderer class,

which is exactly what I need. How can I do that in jME ?



Thanks a lot for help.

Peter Gavora

Things are not that easy in jME itself is scenegraph based.

You can render monospaced text generated from a texture and the latest versions of jME (not sure if its in 2.0.1 already) have support for AngelFonts, which are not just monospaced.

For extended GUI support you might want to have a look at a GUI implementation for jME like NiftyGUI, FengGUI or GBUI.



Cheers,

Normen

Since UTF8 font only has 256 characters you can easily fit it and use it as AngelCode font. As long as you don't need to be able to choose the font dynamically front the system it should be fine.

Hello 3D-boys.



Thanks for your high-speed replies. This is THE WAY to build community.

I'll take a look at the AngelCode fonts. It looks great.



Peter

gavora said:

I'll take a look at the AngelCode fonts. It looks great.


It is.

Momoko_Fan said:

Since UTF8 font only has 256 characters ...


Momoko I have to disagree with you on that one  ;) Check the UTF-8 wiki entry.