How to change the Lemur font style

How to change the Lemur font style?
Whether the lemur supports TTF style?

You can set a different font on the labels themselves or you can set the default font for the current style.

To change the base font for the whole style, it’s something like:

// Example if using the built in 'glass' style
Styles styles = globals.getStyles();
Selector selector = styles.getSelector("glass");
selector.set("font", yourFont);

…where ‘yourFont’ is a JME BitmapFont that you’ve already loaded.

You can convert TTF fonts to .fnt fonts using tools like Hiero or the Angel code bitmap font creator.

https://www.angelcode.com/products/bmfont/

Others have made extensions for loading TTF fonts directly in JME and Lemur but these are not included in Lemur by default.

2 Likes
com.jme3.asset.AssetLoadException: An exception has occurred while loading asset: Textures/yahei/test_000.tga (Flipped)
	at com.jme3.asset.DesktopAssetManager.loadLocatedAsset(DesktopAssetManager.java:274)
	at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:388)
	at com.jme3.asset.DesktopAssetManager.loadTexture(DesktopAssetManager.java:407)
	at com.jme3.font.plugins.BitmapFontLoader.load(BitmapFontLoader.java:102)
	at com.jme3.font.plugins.BitmapFontLoader.load(BitmapFontLoader.java:170)
	at com.jme3.asset.DesktopAssetManager.loadLocatedAsset(DesktopAssetManager.java:272)
	at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:388)
	at com.jme3.asset.DesktopAssetManager.loadFont(DesktopAssetManager.java:434)
	at GUI.UI.initialize(UI.java:99)
	at com.jme3.app.state.BaseAppState.initialize(BaseAppState.java:129)
	at com.jme3.app.state.AppStateManager.initializePending(AppStateManager.java:332)
	at com.jme3.app.state.AppStateManager.update(AppStateManager.java:362)
	at com.jme3.app.SimpleApplication.update(SimpleApplication.java:258)
	at com.jme3.system.lwjgl.LwjglAbstractDisplay.runLoop(LwjglAbstractDisplay.java:160)
	at com.jme3.system.lwjgl.LwjglDisplay.runLoop(LwjglDisplay.java:201)
	at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:242)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.io.IOException: Monochrome and RLE colormapped images are not supported
	at com.jme3.texture.plugins.TGALoader.load(TGALoader.java:462)
	at com.jme3.texture.plugins.TGALoader.load(TGALoader.java:84)
	at com.jme3.asset.DesktopAssetManager.loadLocatedAsset(DesktopAssetManager.java:272)
	... 16 more


Google doesn’t have a good answer

test_000.tga

When generating bitmap font select PNG image type.

1 Like