I imported a font with Hiero and I draw the font like:

font.draw(batch, "1", 0, 48);

This is the resultant image:

enter image description here

So the font it moved up to hit the bottom perfectly, but it doesn't touch the left side perfectly. Why does this happen? Is there a way I can fix this? It seems like if I set the x coordinate to -3 it works, but this seems somewhat arbitrary. Any ideas?


That spacing is called font kerning. And that is exactly why there is padding in front. The purpose of kerning is so that letters fit nicely next to each other, and that they aren't too close or too far away from each other.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.