From Farshid Lashkari, "I found a bug in the osgText library in version 1.2 that I believe still exists in the latest version.
From Farshid Lashkari, "I found a bug in the osgText library in version 1.2 that I believe still exists in the latest version.

I found that changing the alignment of a text object does not work properly if the text contains newline characters. I've attached a simple test case that shows the problem. If I set the text AFTER setting the alignment, everything works fine. But if I set the text BEFORE setting the alignment then the text is displayed incorrectly.

The fix is very simple. Instead of calling computePositions() in TextBase::setAlignment(), it calls computeGlyphRepresentation(). I've attached the modified TextBase.cpp."


omega-hub/osg,ntoand/osg,ntoand/osg,artoolkit/osg,ntoand/osg,stmh/osg,koshman86/osg,koshman86/osg,ntoand/osg,ghub/osg,omega-hub/osg,ghub/osg,XiaoCC/osg,koshman86/osg,ghub/osg,XiaoCC/osg,stmh/osg,artoolkit/osg,omega-hub/osg,ghub/osg,artoolkit/osg,stmh/osg,koshman86/osg,artoolkit/osg,XiaoCC/osg,omega-hub/osg,XiaoCC/osg,stmh/osg,XiaoCC/osg,stmh/osg