[osg-users] Odd Text Distortion (Which Does Not Appear to Be Due to the 3.2 Bugfix)

Sam Jones cambienta at gmail.com
Wed Jul 13 14:44:27 PDT 2016


Hi,

Thanks Robert! Your suggestion was exactly it! I kept trying for a solution involving the camera or something more complicated, completely dismissing that the problem could have been much simpler. Ha. 

I figured perhaps the text looking strange and also being off-center were related problems-- this was not the case. Getting freetype working correctly fixed the appearance of the font, and then some bit later I dug up where the offset issue was coming from and fixed that. 

For the curious, the offset was being caused by using the dimensions of the text's bounding sphere in a calculation to center the text, instead of the dimensions of the text's bounding box (I thought we'd been using the bounding box, but I was incorrect). Since the bounding sphere has a radius presumably determined by the longest dimension of the text, the longer a line of text was along its longest axis, the further offset it turned out along its shorter axis.

Thank you guys for the suggestions!

Cheers,
Sam

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=68127#68127








More information about the osg-users mailing list