OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

TextBase::setCharacterSize


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General
View previous topic :: View next topic  
Author Message
VlaSerg
Newbie


Joined: 29 Oct 2018
Posts: 1

PostPosted: Mon Oct 29, 2018 7:08 pm    Post subject:
TextBase::setCharacterSize
Reply with quote

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
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts serializer bug in osgText::TextBase a... locan Submission 3 Sun Feb 22, 2015 10:00 pm View latest post
No new posts Unexpected osgText::TextBase::compute... Preet General 1 Mon Apr 09, 2012 7:57 am View latest post
No new posts Bug in BB computation in osgText::Tex... hroch General 1 Thu Feb 09, 2012 11:04 am View latest post
No new posts TextBase bounding box rotation fix Terry Welsh Submission 1 Sat May 28, 2011 5:46 pm View latest post
No new posts fix for TextBase::computeBound Terry Welsh Submission 1 Wed Feb 02, 2011 11:51 pm View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP