[osg-users] QFontImplementation

Ale Maro sasha71 at teletu.it
Thu May 4 08:41:30 PDT 2017


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:


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;

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

Thank you in advance. 
Best regards.


Read this topic online here:

More information about the osg-users mailing list