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 

QFontImplementation


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


Joined: 26 Nov 2012
Posts: 37

PostPosted: Thu May 04, 2017 3:41 pm    Post subject:
QFontImplementation
Reply with quote

Hi,

I am trying to use QFontImplementation to create 3D text nodes from Qt fonts.
Text geometry is always empty using it.
I think it is becouse the following method of QFontImplementation returns always a NULL pointer

virtual osgText::Glyph3D* getGlyph3D(unsigned int /*charcode*/) { return 0; }

Is it becouse the implementation is not complete or did I miss something?

This is an extract of my code:

Code:

QFont qtFont("Arial");
osg::ref_ptr<osgQt::QFontImplementation> fontImplementation = new osgQt::QFontImplementation(qtFont);
osg::ref_ptr<osgText::Font> font = new osgText::Font(fontImplementation);
osg::ref_ptr<osgText::Text3D> text3d = new osgText::Text3D;
text3d->setFont(font);
text3d->setText(...);
....


Loading directly font file into osgText::Text3D everything works fine.

Thank you in advance.
Best regards.

Ale
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



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