Cache font heights in a static fixed array.
This is to avoid significant per-call overhead to get font heights, as this is performed very frequently.
This commit is contained in:
@@ -19,6 +19,8 @@
|
||||
typedef uint32 GlyphID;
|
||||
static const GlyphID SPRITE_GLYPH = 1U << 30;
|
||||
|
||||
extern int font_height_cache[FS_END]; ///< Cache of font heights
|
||||
|
||||
/** Font cache for basic fonts. */
|
||||
class FontCache {
|
||||
private:
|
||||
|
Reference in New Issue
Block a user