diff options
author | rubidium <rubidium@openttd.org> | 2013-06-23 15:32:09 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2013-06-23 15:32:09 +0000 |
commit | d724088a1c346ee2e01e5cdec9c9ca4a92e8c12b (patch) | |
tree | e83851727b23e3064be5c56a6202bf28b9016212 /src/fontcache.h | |
parent | eb4388f4f3c9c120cd5d25f2da98859aaed151ec (diff) | |
download | openttd-d724088a1c346ee2e01e5cdec9c9ca4a92e8c12b.tar.xz |
(svn r25442) -Codechange: move height and ascender information into the FontCache instances
Diffstat (limited to 'src/fontcache.h')
-rw-r--r-- | src/fontcache.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/fontcache.h b/src/fontcache.h index 2df587fc3..b26eaa298 100644 --- a/src/fontcache.h +++ b/src/fontcache.h @@ -21,11 +21,18 @@ private: protected: FontCache *parent; ///< The parent of this font cache. const FontSize fs; ///< The size of the font. + int height; ///< The height of the font; public: FontCache(FontSize fs); virtual ~FontCache(); /** + * Get the height of the font. + * @return The height of the font. + */ + inline int GetHeight() { return this->height; } + + /** * Get the SpriteID mapped to the given key * @param key The key to get the sprite for. * @return The sprite. @@ -153,7 +160,7 @@ void UninitFreeType(); #else /* Stub for initializiation */ -static inline void InitFreeType(bool monospace) { extern void ResetFontSizes(bool monospace); ResetFontSizes(monospace); } +static inline void InitFreeType(bool monospace) {} static inline void UninitFreeType() {} #endif /* WITH_FREETYPE */ |