#include <Main/fg_props.hxx>
+class SGBinding;
+
class FGMenuBar;
class FGDialog;
-class FGBinding;
class FGColor;
class FGFontCache;
virtual puFont *getDefaultFont() { return _font; }
- /**
- * menu wide font cache, accessible from other classes as well.
- */
- FGFontCache *get_fontcache() { return _fontcache; }
-
protected:
- FGFontCache * _fontcache;
-
/**
* Test if the menubar is visible.
*
private:
struct fnt {
fnt(puFont *pu = 0) : pufont(pu), texfont(0) {}
- ~fnt() { delete pufont; delete texfont; }
+ ~fnt() { if (texfont) { delete pufont; delete texfont; } }
puFont *pufont;
fntTexFont *texfont;
};
map<const string,fnt *> _fonts;
typedef map<const string,fnt *>::const_iterator _itt_t;
+ bool _initialized;
+ struct fnt *getfnt(const char *name, float size, float slant);
public:
FGFontCache();
puFont *get(const char *name, float size=15.0, float slant=0.0);
puFont *get(SGPropertyNode *node);
+
+ fntTexFont *getTexFont(const char *name, float size=15.0, float slant=0.0);
+
+ SGPath getfntpath(const char *name);
};