Added setting of the FontResolution of the DefaultFont

This commit is contained in:
Robert Osfield
2017-09-29 10:25:04 +01:00
parent 468d6d8eea
commit 1f36f5bd8d

View File

@@ -24,8 +24,15 @@ using namespace osgText;
DefaultFont::DefaultFont()
{
_fontSize = FontResolution(8,12);
_minFilterHint = osg::Texture::LINEAR_MIPMAP_LINEAR;
_magFilterHint = osg::Texture::NEAREST;
_margin = 8;
_marginRatio = 0.0;
_glyphInterval = 16;
constructGlyphs();
}
@@ -233,6 +240,8 @@ void DefaultFont::constructGlyphs()
glyph->setVerticalBearing(osg::Vec2(0.5f,1.0f)); // top middle.
glyph->setVerticalAdvance(sourceHeight*coord_scale);
glyph->setFontResolution(fontRes);
addGlyph(fontRes,i,glyph.get());
}
}