Yes, you are correct that this wouldn't help with StatsHandler or
HelpHandler. For StatsHandler you might be able to get away with
deriving a class like this:
class MyStatsHandler : public osgViewer::StatsHandler {
public:
MyStatsHandler() : _font("myfont.ttf") {}
};
otherwise you can just set _font in the constructor.
HelpHandler isn't so easy. You should look at HelpHandler.cpp to get a
feel for the geometry layout, and derive a subclass or use a NodeVisitor
to walk the geometry and update those fonts.
I think that those are the only two classes that make the osg core and use
fonts though (osgAnimation/StatsHandler.cpp and osgShadow/ShadowMap.cpp
also have fonts hardcoded).
I don't believe that there is a cureall solution though.
-K
On Tue, 13 Dec 2011, Thomas Lerman wrote:
Would that not set the font for those created objects and not for the system? In
other words, I believe things like StatsHandler & HelpHandler would still use
the hard-coded fonts. Am I missing something?
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=44369#44369
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org