From 3ab986726467e0bed6d5f3bb8271b32be3ef4d2d Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 20 Apr 2005 09:55:24 +0000 Subject: [PATCH] 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. --- src/osgText/Text.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/osgText/Text.cpp b/src/osgText/Text.cpp index e87b65388..252e2d025 100644 --- a/src/osgText/Text.cpp +++ b/src/osgText/Text.cpp @@ -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) {