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:
Robert Osfield
2011-01-11 11:39:31 +00:00
parent d59ac54b31
commit 74cf034404
9 changed files with 174 additions and 247 deletions

View File

@@ -37,6 +37,15 @@ public:
virtual const char* className() const { return "Text"; }
virtual const char* libraryName() const { return "osgText"; }
virtual void setFont(Font* font=0) { setFont(osg::ref_ptr<Font>(font)); };
/** Set the Font to use to render the text.*/
virtual void setFont(osg::ref_ptr<Font> font);
/** Set the font, loaded from the specified front file, to use to render the text,
* setFont("") sets the use of the default font.
* See the osgText::readFontFile function for how the font file will be located. */
virtual void setFont(const std::string& fontfile) { TextBase::setFont(fontfile); }
/**
* Turns off writing to the depth buffer when rendering text. This only affects text