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 

osgText with very large size


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General [forum]
View previous topic :: View next topic  
Author Message
tolleybot
Newbie


Joined: 20 Jul 2014
Posts: 6

PostPosted: Wed Jul 23, 2014 2:38 am    Post subject:
osgText with very large size
Reply with quote

Hi,

I am attempting to create some osgText which has a very large size value. I noticed that if I keep the size parameter under 50 it looks fine. If I crank it up to say 500, the text looks fuzzy on the edges and just bad. I am using a TTF font. I am pretty new to using text so maybe one of you OSG wizards can shed some light onto this.

Code:
osg::ref_ptr<osgText::Text> text = new osgText::Text;
text->setFont(m_pFont.get() );
text->setCharacterSize( size );
text->setAxisAlignment( osgText::TextBase::XY_PLANE );
text->setPosition( pos );
text->setText( content );
return text.release();


Thank you!

Cheers,
Don
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 10855

PostPosted: Wed Jul 23, 2014 6:42 am    Post subject:
osgText with very large size
Reply with quote

Hi Don,

Add a call to set the font resolution used:


   text->setFontResolution(100,100);


Or try use Text3D as this polygonal based.


Robert.



On 23 July 2014 03:38, Don Tolley < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Hi,

I am attempting to create some osgText which has a very large size value.  I noticed that if I keep the size parameter under 50 it looks fine.  If I crank it up to say 500, the text looks fuzzy on the edges and just bad.  I am using a TTF font.  I am pretty new to using text so maybe one of you OSG wizards can shed some light onto this.


Code:
osg::ref_ptr<osgText::Text> text = new osgText::Text;
text->setFont(m_pFont.get() );
text->setCharacterSize( size );
text->setAxisAlignment( osgText::TextBase::XY_PLANE );
text->setPosition( pos );
text->setText( content );
return text.release();



Thank you!

Cheers,
Don

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





_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
tolleybot
Newbie


Joined: 20 Jul 2014
Posts: 6

PostPosted: Wed Jul 23, 2014 1:43 pm    Post subject:
Reply with quote

Hi,

Thanks! that works great.


Cheers,
Don
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 [forum] 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 Drawing large number of labels loopy General 5 Fri Mar 31, 2017 12:12 am View latest post
No new posts osgText::Text fix for GLES2 (OpenScen... Konstantin Submission 1 Tue Feb 14, 2017 6:37 pm View latest post
No new posts Version 3.5.6 osgText::Text bounding ... dcfennell General 0 Tue Jan 31, 2017 5:40 pm View latest post
No new posts bug: osgText doesn't work on MacOSX G... remoe General 19 Fri Jan 20, 2017 7:53 pm View latest post
No new posts Geometry in world coordinates but wit... Roko General 11 Wed Jan 18, 2017 8:43 am 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