Advertisement

BMFont: Should kerning value be added to the xadvance?

Started by February 26, 2014 02:30 PM
0 comments, last by WitchLord 10 years, 8 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!

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