10#ifndef MOCK_FONTCACHE_H
11#define MOCK_FONTCACHE_H
15#include "../fontcache.h"
16#include "../string_func.h"
23 this->
height = FontCache::GetDefaultFontHeight(this->fs);
36 static void InitializeFontCaches()
Font cache for basic fonts.
int height
The height of the font.
static FontCache * caches[FS_END]
All the font caches.
const FontSize fs
The size of the font.
Font cache for mocking basic use of fonts.
GlyphID MapCharToGlyph(char32_t key, bool allow_fallback=true) override
Map a character into a glyph.
std::string GetFontName() override
Get the name of this font.
uint GetGlyphWidth(GlyphID) override
Get the width of the glyph with the given key.
void ClearFontCache() override
Clear the font cache.
const Sprite * GetGlyph(GlyphID) override
Get the glyph (sprite) of the given key.
void SetUnicodeGlyph(char32_t, SpriteID) override
Map a SpriteID to the key.
bool GetDrawGlyphShadow() override
Do we need to draw a glyph shadow?
void InitializeUnicodeGlyphMap() override
Initialize the glyph map.
bool IsBuiltInFont() override
Is this a built-in sprite font?
uint32_t GlyphID
Glyphs are characters from a font.
uint32_t SpriteID
The number of a sprite, without mapping bits and colourtables.
FontSize
Available font sizes.
Data structure describing a sprite.