i’m using a font, to generate a .fnt compatible file for nifty, when i’m generating a system font, its not generating the exact font as it is in system font.
this is the name of the system font Alte Din 1451 Mittelschrift gep Regular (din1451altg.ttf) which looks like this
Maybe increase the resolution of the font bitmap, seems like pushing pixels around makes this happen. Do you use the SDK-internal tool for creating the fonts?
That’s pretty small. I wouldn’t use anything less than 24 with some fonts. Really there is plenty of space for them even in a smaller texture.
Also, one real downside of the .fnt format is that it works in integers for all of its per-glyph parameters. This screws with the kerning on smaller fonts… actually I even have noticeable kerning issues on one of my 32 size fonts. I hand edited the file to fix some of the worst issues but I’ve long considered going back and making an even larger one.
The size in the .fnt controls the size of the character images in the PNG file.
…but you are right, I don’t think nifty gives a way to set the text size so it always uses what’s in the .fnt. I use nifty less and less these days so I forget. For BitmapText you can set whatever size you want.
It’s a limitation of the .fnt format that the internal offsets are all integer. Still, your problem is one of pixels and I’m not sure there is much you can do.
If you can somehow show that the font looks correct in non-JME nifty then maybe there is something wrong with JME. Otherwise, it may just be a limitation of the medium.
Nifty is not part of JME. Nifty is a GUI library outside of JME. JME implements a layer to connect Nifty to JME.
You can use Nifty without JME… and it uses its own font renderer. If the font looks fine in plain Nifty then the problem is something that can maybe be fixed in JME.
If the font still looks bad in plain Nifty then it is not a “problem”, it’s just “the way things are”… a permanent limitation in the .fnt format.
You could also look in the .png file that was generated with the font to see if the C and O look odd in comparison to the others.
On the font generation side you could play with the Font Smoothing and subsampling settings. Maybe they provide a more consistent result… or maybe turn off smoothing completely. (I don’t remember if it’s on by default or not.)
when i enable smoothing, the font gets a little bold, and sets stable, no distortion, but its BOLD! and when i enable bold check option, then the font cant be displayed! lol
this is sumthing to do with the conversion i guess!