[osg-users] osgText and SCREEN_COORDS -- aspect ratio problem

Glenn Waldron gwaldron at gmail.com
Sat Feb 13 09:34:18 PST 2016


Robert,

I'm using osgText with setCharacterSizeMode(SCREEN_COORDS). The vertical
size of the text is always correct, but the horizontal size changes with
the aspect ratio of the viewport.

This is easy to reproduce with the "osgtext" example. Just run the example
and resize the window so that it has a high x/y aspect ratio (say 10x as
wide as it is high). You can see the pink SCREEN_COORDS text in the center
become squished.

I believe the problem is here:

https://github.com/openscenegraph/osg/blob/master/src/osgText/Text.cpp#L688

For SCREEN_COORDS, I believe that a single scale factor for both vertical
and horizontal makes sense. (If I change both scale factors to
use "pixelSizeVert" the problem goes away).

If this makes sense, I can file a submission. Thanks.

Glenn Waldron
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20160213/c185cfb4/attachment-0001.htm>


More information about the osg-users mailing list