I would like to load Fonts before displaying canvas so that it gets faster.

However, I get null Pointer Exception.

Exception in thread "main" java.lang.NullPointerException
at com.jmex.font3d.Font3D.<init>(Unknown Source)

at the line new Font3D(...).

Do I need to do something before creating Font3D?

Let me rephrase question.

I am getting an error at Font3D class when it does DisplaySystem.getDisplaySystem().getRenderer() because it returns null.

Do you guys know how to initialize the renderer just to load Fonts and not affect the canvas later on?


If the renderer is null, that means that you will have to not only create a jME application, but also make the Canvas visible for it to actually run. Now, you could also try creating a DummyDisplay and see if with it you can create the geometry of the text… note that you will not be able to create any textures, or do anything fancy with this approach.