Font3D issues

I'm trying to utilize Font3D to display 3D text for the LoadingGameState and I'm running into a very strange issue.

I keep getting this error:

Exception in thread "main" java.lang.UnsatisfiedLinkError: initGVIDs
   at sun.font.SunLayoutEngine.initGVIDs(Native Method)
   at sun.font.SunLayoutEngine.<clinit>(
   at sun.font.GlyphLayout.get(
   at java.awt.Font.layoutGlyphVector(
   at com.jmex.font3d.Font3D.<init>(

All I'm doing is this:

      Font3D font = new Font3D(new Font("Arial", Font.PLAIN, 2), 0.1, true, true, true);
      Font3DTexture texture = new Font3DTexture(TestTextureState.class.getClassLoader().getResource("jmetest/data/model/marble.bmp"));
      Text3D text = font.createText("This is a test", 2.0f, 0);

Is there something I'm doing wrong here?  It doesn't give me that exception when I run the test, but I'm not seeing what I'm doing differently.  Is it perhaps something set in SimpleGame that is not being set here?

Forgive the quick bump on this, but I was hoping to have the new loading system done tonight.  I need some other eyes here because I'm not seeing what I'm doing wrong here.  Is there anything else explicitly necessary before an invocation of new Font3D can be called?

It looks like I'm missing a native library, but I can't imagine what it is.  However, what makes this even more strange is that the test works.  If I don't hear back from anyone I'm going to just have to go through SimpleGame and all its supers to figure out what it is that I'm missing.

Okay, very strange, but apparently I hit on a bug in my JDK 1.5 version that has since been fixed:

I switched to 1.6 and it works just fine.

I understand that this is a work-in-progress, and now know why logging is disabled in the test:

==== ERROR ====: The removal of edge {(real  )5(0.484375,0.21875)->4:(0.5625,-0.0),Helper:[indx:5,(0.484375,0.21875),type:REGULAR_LEFT],angle:-1.2277724} did not succeed
com.jmex.font3d.math.GeometricException: Bound two edges, one real one unreal, that is not possible in a closed polygon
at com.jmex.font3d.math.TriangulationVertex.checkAllEdges(
at com.jmex.font3d.math.Triangulator.checkTriangulation(
at com.jmex.font3d.math.Triangulator.generateMonotonePolygons(
at com.jmex.font3d.math.Triangulator.triangulate(
at com.jmex.font3d.Glyph3D.triangulate(
at com.jmex.font3d.Font3D.<init>(
at com.jme.util.GameTask.invoke(
at com.jme.util.GameTaskQueue.execute(
==== ERROR ====: The removal of edge {(real  )14(0.046875,0.71875)->13:(0.15625,0.578125),Helper:[indx:14,(0.046875,0.71875),type:START],angle:-0.90975314} did not succeed
We could find no left of {(real  )5(0.171875,0.40625)->4:(0.171875,0.625),Helper:null,angle:1.5707964}: 0.171875
We could find no left of {(real  )8(0.171875,0.328125)->7:(0.5625,0.328125),Helper:null,angle:0.0}: 0.171875
We could find no left of {(real  )9(0.171875,0.078125)->8:(0.171875,0.328125),Helper:null,angle:1.5707964}: 0.171875
EDGE: {(real  )14(0.046875,0.71875)->13:(0.15625,0.578125),Helper:[indx:14,(0.046875,0.71875),type:START],angle:-0.90975314}:0.28993058
EDGE: {(real  )1(0.078125,0.71875)->0:(0.078125,-0.0),Helper:[indx:4,(0.171875,0.625),type:SPLIT],angle:-1.5707964}:0.078125
EDGE: {(real  )14(0.046875,0.71875)->13:(0.15625,0.578125),Helper:[indx:14,(0.046875,0.71875),type:START],angle:-0.90975314}:0.35069442
EDGE: {(real  )1(0.078125,0.71875)->0:(0.078125,-0.0),Helper:[indx:6,(0.5625,0.40625),type:REGULAR_RIGHT],angle:-1.5707964}:0.078125
EDGE: {(real  )14(0.046875,0.71875)->13:(0.15625,0.578125),Helper:[indx:14,(0.046875,0.71875),type:START],angle:-0.90975314}:0.54513884
EDGE: {(real  )1(0.078125,0.71875)->0:(0.078125,-0.0),Helper:[indx:8,(0.171875,0.328125),type:SPLIT],angle:-1.5707964}:0.078125
Edge1:{(real  )12(0.171875,0.671875)->4:(0.171875,0.625),Helper:null,angle:-1.5707964}

ERROR in char: (202:

While I'm spitting up information about Font3D, it also has direct ties to OpenGL thread so it must be instantiated there.

Bumping this one, with jME 0.11 and JDK 6 there are still the same Errors.


It seems to work fine, but it generates lots of warnings.

Unfortunately this is something that I think none of the developers ever touch so it hasn't gotten the attention it deserves yet.  I fear we're going to have to make a lot of sweeping changes before the text support is where we want it.  Anyone willing to spend the time to either fix what's there or create something that works better would be very welcome to it.

This is definitely something that needs to be re-evaluated in addition to support for vector fonts.

Java3D does a good job with 3D text, is that what we are aiming at here? If so, then I will give it a try.

If I recall that is one of the reasons this came about is because Java3D converts were asking about the functionality.  However, it would be nice if you specified 0.0f depth then it would be flat 2D text that can be used in the scene.