Bugfix (found by arras): CGUIFont::getCharacterFromPos no longer ignores kerning.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2482 dfc29bdd-3216-0410-991c-e03cc46cb475
master
cutealien 2009-07-16 05:11:34 +00:00
parent ca5258cd0b
commit 40a8a7a259
1 changed files with 1 additions and 1 deletions

View File

@ -633,7 +633,7 @@ s32 CGUIFont::getCharacterFromPos(const wchar_t* text, s32 pixel_x) const
{
const SFontArea& a = Areas[getAreaFromCharacter(text[idx])];
x += a.width + a.overhang + a.underhang;
x += a.width + a.overhang + a.underhang + GlobalKerningWidth;
if (x >= pixel_x)
return idx;