diff --git a/src/osgPlugins/txf/TXFFont.cpp b/src/osgPlugins/txf/TXFFont.cpp index 9726a80ea..c1860b552 100644 --- a/src/osgPlugins/txf/TXFFont.cpp +++ b/src/osgPlugins/txf/TXFFont.cpp @@ -256,6 +256,10 @@ TXFFont::loadFont(std::istream& stream) float texToVertX = float(glyphs[i].width)/width; float texToVertY = float(glyphs[i].height)/height; + + glyph->setWidth(width); + glyph->setHeight(height); + glyph->setHorizontalAdvance(glyphs[i].advance + 0.1f*maxheight); glyph->setHorizontalBearing(osg::Vec2((glyphs[i].x_off - 0.5f)*texToVertX, (glyphs[i].y_off - 0.5f)*texToVertY)); diff --git a/src/osgPlugins/txf/TXFFont.h b/src/osgPlugins/txf/TXFFont.h index 2286f341b..bd5544a61 100644 --- a/src/osgPlugins/txf/TXFFont.h +++ b/src/osgPlugins/txf/TXFFont.h @@ -36,8 +36,6 @@ public: virtual osg::Vec2 getKerning(unsigned int leftcharcode,unsigned int rightcharcode, osgText::KerningType kerningType); - virtual float getScale() const { return 1.0; } - bool loadFont(std::istream& stream); protected: