Unified more of the 2D and 3D text setup, fixed bugs in Text3D setup
which address the problems of black 3D text and the kerning causing problems with font positioning.
This commit is contained in:
@@ -93,14 +93,6 @@ void TextBase::setFont(osg::ref_ptr<Font> font)
|
||||
{
|
||||
if (_font==font) return;
|
||||
|
||||
osg::StateSet* previousFontStateSet = _font.valid() ? _font->getStateSet() : Font::getDefaultFont()->getStateSet();
|
||||
osg::StateSet* newFontStateSet = font.valid() ? font->getStateSet() : Font::getDefaultFont()->getStateSet();
|
||||
|
||||
if (getStateSet() == previousFontStateSet)
|
||||
{
|
||||
setStateSet( newFontStateSet );
|
||||
}
|
||||
|
||||
_font = font;
|
||||
|
||||
computeGlyphRepresentation();
|
||||
|
||||
Reference in New Issue
Block a user