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

@@ -41,15 +41,15 @@ public:
/** Set the Font to use to render the text.
* setFont(0) sets the use of the default font.*/
inline void setFont(Font* font=0) { setFont(osg::ref_ptr<Font>(font)); };
virtual void setFont(Font* font=0) { setFont(osg::ref_ptr<Font>(font)); };
/** Set the Font to use to render the text.*/
void setFont(osg::ref_ptr<Font> font);
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. */
void setFont(const std::string& fontfile);
virtual void setFont(const std::string& fontfile);
/** Get the font. Return 0 if default is being used.*/
const Font* getFont() const { return _font.get(); }