10#ifndef SPRITEFONTCACHE_H
11#define SPRITEFONTCACHE_H
13#include "../string_func.h"
14#include "../fontcache.h"
Font cache for basic fonts.
const FontSize fs
The size of the font.
Font cache for fonts that are based on a freetype font.
uint GetGlyphWidth(GlyphID key) override
Get the width of the glyph with the given key.
void InitializeUnicodeGlyphMap() override
Initialize the glyph map.
GlyphID MapCharToGlyph(char32_t key, bool allow_fallback=true) override
Map a character into a glyph.
SpriteID GetUnicodeGlyph(GlyphID key)
Get SpriteID associated with a GlyphID.
std::unordered_map< GlyphID, SpriteID > glyph_to_spriteid_map
Mapping of glyphs to sprite IDs.
bool GetDrawGlyphShadow() override
Do we need to draw a glyph shadow?
std::string GetFontName() override
Get the name of this font.
void SetUnicodeGlyph(char32_t key, SpriteID sprite) override
Map a SpriteID to the key.
void ClearFontCache() override
Clear the font cache.
const Sprite * GetGlyph(GlyphID key) override
Get the glyph (sprite) of the given key.
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.