tolleybot Newbie
Joined: 20 Jul 2014 Posts: 6
|
Posted: Wed Jul 23, 2014 2:38 am Post subject: osgText with very large size |
|
|
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 |
|
robertosfield OSG Project Lead
Joined: 18 Mar 2009 Posts: 12204
|
Posted: Wed Jul 23, 2014 6:42 am Post subject: osgText with very large size |
|
|
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 |
|
tolleybot Newbie
Joined: 20 Jul 2014 Posts: 6
|
Posted: Wed Jul 23, 2014 1:43 pm Post subject: |
|
|
Hi,
Thanks! that works great.
Cheers,
Don |
|