Added setting of size.
This commit is contained in:
@@ -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));
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user