BitmapFont Proper Spacing (SOLVED)

Anything libgdx related goes here!

BitmapFont Proper Spacing (SOLVED)

Postby Thyme Cypher » Wed Jun 27, 2012 5:23 pm

I've created a font using BMFont (Simply because I need there to be no anti-aliasing), although I don't think this is relevant, I can't seem to get the characters to be spaced properly. My game uses pixel tripling, and the characters are spaced 2 pixels apart (Rendering, of course, as 6 pixels). I was hoping to get them to be single spaced (3 pixels), but even with all of the spacing in the bitmap font set to 0, nothing happens. Playing around, I changed the spacing and padding to various values and they seem to actually have no effect on how libGDX renders text.

Does anyone know how to change the spacing of characters?

Thanks,
Thyme Cypher
Last edited by Thyme Cypher on Thu Jun 28, 2012 2:40 am, edited 1 time in total.
Thyme Cypher
 
Posts: 11
Joined: Wed Jun 27, 2012 5:12 pm

Re: BitmapFont Proper Spacing

Postby AranHase » Thu Jun 28, 2012 12:07 am

Are you trying to change the ".fnt" file? If so, you can try changing the "xadvance" variable, it will change the space to the next character. Also, some fonts can generate some "kernings", that is the space between two characters. I don't know the sintax to declare kernings on ".fnt" files at this moment, maybe someone can help?
Amaisu Games - http://www.amaisu.com/ (offline for now :()
AranHase
 
Posts: 39
Joined: Thu Sep 29, 2011 3:09 pm

Re: BitmapFont Proper Spacing

Postby Thyme Cypher » Thu Jun 28, 2012 2:35 am

This is exactly what I was looking for, thanks!
It seems to do the math in an interesting way, so it's going to be a lot of guesswork, but at least it's progress :P
Thyme Cypher
 
Posts: 11
Joined: Wed Jun 27, 2012 5:12 pm


Return to Libgdx

Who is online

Users browsing this forum: Bing [Bot], doctorevil, Yahoo [Bot] and 9 guests