[osg-users] QFontImplementation
Ale Maro
sasha71 at teletu.it
Thu May 4 08:41:30 PDT 2017
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
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=70880#70880
More information about the osg-users
mailing list