I see arial.ttf referred 13 times, most of which are hardcoded in the fonts
directory. Most of my development has been on Windows and that font is
standard. Recently, I did some stuff on Linux where Arial is not a default font
and therefore text looked pretty ugly. It was somewhat of a pain to
You can set the font.
osg::ref_ptrosgText::Font font = osgText::readFontFile('yourfont.ttf');
osg::ref_ptrosgText::Text txt = new osgText::Text;
txt-setFont(font.get());
-K
On Tue, 13 Dec 2011, Thomas Lerman wrote:
I see arial.ttf referred 13 times, most of which are hardcoded in the fonts
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:
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
Hi Thomas,
The OpenSceneGraph-Data contains the Arial.ttf font so you can just
place this on your OSG_FILE_PATH and the OSG with then pick it up.
Robert.
On 13 December 2011 18:29, Thomas Lerman osgfo...@tevs.eu wrote:
I see arial.ttf referred 13 times, most of which are hardcoded in the fonts
5 matches
Mail list logo