Hi Frederic and Magnus, On Fri, May 13, 2011 at 9:14 AM, Robert Osfield <[email protected]> wrote: > Not sure where the culprit lies, it might be lack of scaling on the > osgText side, or perhaps just needing to rescale the sizes in txf. I > will dig into the code and see what is going on.
I have tracked down the problem to fact that osgText now assumes that all fonts handle their own scaling to a unit font size of 1.0, rather than have each font come in at any size and then require osgText itself to rescale these. The freetype plugin honoured this, but the txf font didn't scale it's glyph settings to be against a unit size. I have now added this and checked it in. Could you please test this out? In test with the txf plugin with a tweaked version of the osgtext example I found that while the scaling issues now looked to be resolved quite a few of the character representations on screen were corrupted or just blank. Initially I thought that it was down the txf plugin becasue the freetype and default fonts all worked correctly, but after much digging the culrprit for these rendering problems looked to be the mechanism for placing the glyph images into the GlyphTexture (which works as texture atlas). I haven't yet established exactly what is going wrong, but as a workaround increasing the margin size between the glyphs in the GlyphTexture resolves the rendering problems. Increasing margin size really is just a hack that happens to work for this particular font, I don't see it as a resolving the bug so I won't check this hack. Curiously this bug will have been lurking unseen for a while, and mainly just luck that it hasn't appeared with the freetype fonts. Robert. _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

