Batched Nifty and multiple fonts in JME 3.1 problems

Batched Nifty and multiple fonts in JME 3.1 problems. Has anyone had success having multiple fonts with batching enabled? I changed to batching Nifty and now everything is displayed with the same font in the GUI. Different colors etc are there. But the font file itself is the same now. It worked before the batching.

I ran into that when I switched to 3.1 too. There is a field inside the font file that is null. Nifty basically thinks all of your fonts are the same font which is why you aren’t getting different fonts. I don’t remember which field it is, but I am pretty sure it shows up as null in the file.

Inside the .fnt file there is a face field


all new fonts created have this value. So to use multiple just open each .fnt file and give it an unique value like for example


batching may not work well if you plan to release on Android, it can turn the UI into a crappy mess, so be careful


Thanks! So does Nifty batch these font files also? I’m asking since I have 22 font sizes…

Yes. I’m pretty sure any image that nifty uses is added to their batch system.