Hi All,

On Fri, May 13, 2011 at 5:45 PM, Robert Osfield
<[email protected]> wrote:
> I still haven't tracked down the bugs
> I'm seeing on rendering using txf with the osgtext example, so there is
> chance that you might see problems later with more intensive use.  I'm
> still hunting this bug down so fingers crossed I'll nail it soon.

After a rather exhusting and perplexing debug session I finally
conerned the bug to
the way that the src/osgText/Font.cpp was caching seperate sets of
osgText::Glyph for
different font resolutions.  This is correct behviour for formats like
FreeType or QFont,
but for fonts like the osgText::DefaultFont and the TXF fonts it's not
appropriate as these
only support a fixed resolution size, so if you request a different
font resolution you don't
actually get a different glyph, so it's inappropriate to cache it
multiple times.  It's this
sharing of single Glyph between multiple apparent font resolutions
that caused the problem
with rendering of osgtext when using with Helvertica.txf.

I have now changed osgText::Font::FontImplementation so it can
automatically tell osgText::Font that
it's inappropriate to use the font resolution requested as guide, and
to just use a single glyph cache
for this fixed size.   I had to update the freetype, DefaultFont,
osgQt::QFontImplementation and
txf plugin all to provide the correct setting, and this is all now checked in.

Curiously this particular bug will have been in the OSG for a very
long time, almost as long as osgText,
but was just never detected or characterised.

I also spotted and fixed a bug in handling of the
Object::resizeGLObjectLists request that may have meant
that opening new contexts whilst using fonts would have resulted in
the texturing of the text quads going astray.

All these changes are now checked into svn/trunk.

Cheers,
Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to