Sergey Vla
2018-10-29 19:08:28 UTC
Hi,
My code:
osg::ref_ptr<osgText::Font> font_ = new osgText::Font( new osgQt::QFontImplementation(QFont("Arial", 14) );
osgText::Text* text = new osgText::Text;
text->setAxisAlignment(osgText::Text::SCREEN);
text->setAlignment(osgText::Text::CENTER_CENTER);
text->setColor(color);
text->setFont( font_ );
float h = ???;
text->setCharacterSize( h );
My question.
What value should be assigned to "h", so that the image text in size would correspond to the parameters QFont ("Arial", 14) and display it using QPainter on the screen for a given dpiY?
Thank you!
Cheers,
Sergey
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75148#75148
My code:
osg::ref_ptr<osgText::Font> font_ = new osgText::Font( new osgQt::QFontImplementation(QFont("Arial", 14) );
osgText::Text* text = new osgText::Text;
text->setAxisAlignment(osgText::Text::SCREEN);
text->setAlignment(osgText::Text::CENTER_CENTER);
text->setColor(color);
text->setFont( font_ );
float h = ???;
text->setCharacterSize( h );
My question.
What value should be assigned to "h", so that the image text in size would correspond to the parameters QFont ("Arial", 14) and display it using QPainter on the screen for a given dpiY?
Thank you!
Cheers,
Sergey
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75148#75148