Removed increment of the cursor position by the bearing value in the compute

last character code as this should not be used when moving the cursor.
This commit is contained in:
Robert Osfield
2005-04-20 09:55:24 +00:00
parent 154656e24a
commit 3ab9867264

View File

@@ -261,7 +261,6 @@ String::iterator Text::computeLastCharacterOnLine(osg::Vec2 cursor, String::iter
float hr = _characterHeight/(float)activefont->getFontHeight();
float wr = hr/_characterAspectRatio;
bool horizontal = _layout!=VERTICAL;
bool kerning = true;
unsigned int previous_charcode = 0;
@@ -311,11 +310,6 @@ String::iterator Text::computeLastCharacterOnLine(osg::Vec2 cursor, String::iter
break; // no kerning when vertical.
}
}
osg::Vec2 bearing(horizontal?glyph->getHorizontalBearing():glyph->getVerticalBearing());
cursor.x() += bearing.x() * wr;
cursor.y() += bearing.y() * hr;
// check to see if we are still within line if not move to next line.
switch(_layout)
{