🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

BMFont: Should kerning value be added to the xadvance?

Started by
0 comments, last by WitchLord 10 years, 4 months ago

to get the x position of the next character, one should shift by xadvance.

but should one also add any possible kerning amount?

so:

x_pos_for_next_char = current_x_pox + character.xadvance

or

x_pos_for_next_char = current_x_pos + character.xadvance + kerning

thanks!

Advertisement

The latter :)

Of course, the kerning will be different for different character sequences so you need to lookup the correct kerning based on the current and next character pair.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

This topic is closed to new replies.

Advertisement