Added setting of the FontResolution of the DefaultFont
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user