Hi Robert!

The osgtext example works fine, my app not. The difference is that I was 
calling:

Code:

osgText::readFontFile("arial.ttf");




instead of:


Code:

osgText::readFontFile("fonts/arial.ttf");




I added the "fonts" part but the "cubic" display persists.

Now, in both situations (using "fonts/arial.ttf" or "arial.ttf"), the font 
smart pointer:


Code:

    const char* font_name = "arial.ttf";  // or   fonts/arial.ttf
    const std::string found = osgText::findFontFile( font_name );
    osg::ref_ptr<osgText::Font> font = osgText::readFontFile( found );




is valid.

#####################################

Another thing, if in Font::readFontFile I add this:


Code:

    if( !font ) {
        throw 1;
    }




after 
Code:
osgText::Font* font = dynamic_cast<osgText::Font*>(object);



the osgtext example will crash, even tough the font was found. How can the font 
be both valid and invalid?

---

Thanks and cheers,
Andrés.

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





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to