From Romain Ouabdelkader, "This is a fix for osgText to calculate kerning and to load glyph3D with the text's font resolution.
Font::getKerning(...), Font::getGlyph3D(...) doesn't ask for a font resolution so it uses the last font resolution requested by Font:: getGlyph(...). This can leads to different results depending of the precedent call to Font::getGlyph(...). See http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2016-January/271952.html for more infos. This fix adds a font resolution parameter to Font::getKerning(...), Font::getGlyph3D(...) and to the font implementations. This was made under the base revision r15182."
This commit is contained in:
@@ -122,7 +122,7 @@ QFontImplementation::getGlyph(const osgText::FontResolution& fontRes, unsigned i
|
||||
}
|
||||
|
||||
osg::Vec2
|
||||
QFontImplementation::getKerning(unsigned int /*leftcharcode*/, unsigned int /*rightcharcode*/, osgText::KerningType /*kerningType*/)
|
||||
QFontImplementation::getKerning(const osgText::FontResolution& /*fontRes*/, unsigned int /*leftcharcode*/, unsigned int /*rightcharcode*/, osgText::KerningType /*kerningType*/)
|
||||
{
|
||||
return osg::Vec2(0, 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user