Hi Eric, I have spent all morning tracking down the bug with osgText's manage of margins and found it to be rather convoluted, with multiple places trying to for the margin at one time - an implementation approach that is really sensitive to changes in margin.
Rather than adjust this delicate balance I have refactored all the margin code such that now only src/osgText/Font.cpp manages the margins, and removed the old code for inserting/accounting for margins in Text.cpp and the freetype and txf plugins. I also introduced a new margin ratio to osgText::Font to allow it to compute more appropriate margins based on size of the glyph. I have set this ratio to 0.05, and reduced the original margin value to 1. The new method for setting this is Font::setGlyphImageMarginRatio(float). These changes will hopefully remove the need to override the margin yourself, so please do an svn update, then comment out all your set margin via font->setGlyphImageMargin(int). Ideally we should be able to select a low value for the margin ratio, perhaps lower than 0.05, the lower the less memory we'll use. Too low and we'll end up with texels from neighbouring glyphs bleeding in. Let me know how you get on. Robert.
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
