From Christian Kaser, "I discovered a bug that lead to a space being displayed at the start of the new line after an automatic line break (through setMaximumWidth()). The fix simply skips all spaces at the end of the line, before skipping a line break which was done already.

osgText/Text.cpp: Line 502
       ...
       else
       {
           ++itr;
       }

       if (itr!=_text.end())
       {
           // skip over spaces and return.
           while (*itr==' ') ++itr;                // New
           if (*itr=='\n') ++itr;
       }

       // move to new line.
       switch(_layout)
       {
       .."
This commit is contained in:
Robert Osfield
2008-04-13 14:32:13 +00:00
parent c045af6481
commit e94d6a0b30

View File

@@ -499,7 +499,8 @@ void Text::computeGlyphRepresentation()
if (itr!=_text.end())
{
// skip over return.
// skip over spaces and return.
while (*itr==' ') ++itr;
if (*itr=='\n') ++itr;
}