|
OpenTTD
|
Functions to read fonts from files and cache them. More...
Go to the source code of this file.
Data Structures | |
| class | FontCache |
| Font cache for basic fonts. More... | |
| struct | FreeTypeSubSetting |
| Settings for a single freetype font. More... | |
| struct | FreeTypeSettings |
| Settings for the freetype fonts. More... | |
Typedefs | |
| typedef uint32 | GlyphID |
| Glyphs are characters from a font. | |
Functions | |
| static SpriteID | GetUnicodeGlyph (FontSize size, WChar key) |
| Get the SpriteID mapped to the given font size and key. | |
| static void | SetUnicodeGlyph (FontSize size, WChar key, SpriteID sprite) |
| Map a SpriteID to the font size and key. | |
| static void | InitializeUnicodeGlyphMap () |
| Initialize the glyph map. | |
| static void | ClearFontCache () |
| static const Sprite * | GetGlyph (FontSize size, WChar key) |
| Get the Sprite for a glyph. | |
| static uint | GetGlyphWidth (FontSize size, WChar key) |
| Get the width of a glyph. | |
| static bool | GetDrawGlyphShadow (FontSize size) |
| void | InitFreeType (bool monospace) |
| (Re)initialize the freetype related things, i.e. | |
| void | UninitFreeType () |
| Free everything allocated w.r.t. | |
Variables | |
| static const GlyphID | SPRITE_GLYPH = 1U << 30 |
| FreeTypeSettings | _freetype |
Functions to read fonts from files and cache them.
Definition in file fontcache.h.
| typedef uint32 GlyphID |
Glyphs are characters from a font.
Definition at line 19 of file fontcache.h.
| void InitFreeType | ( | bool | monospace | ) |
(Re)initialize the freetype related things, i.e.
load the non-sprite fonts.
| monospace | Whether to initialise the monospace or regular fonts. |
Definition at line 643 of file fontcache.cpp.
References FS_BEGIN, FS_MONO, FontCache::Get(), FontCache::HasParent(), and LoadFreeTypeFont().
Referenced by CheckForMissingGlyphs(), MissingGlyphSearcher::FindMissingGlyphs(), openttd_main(), and SetFallbackFont().
| void UninitFreeType | ( | ) |
Free everything allocated w.r.t.
fonts.
Definition at line 660 of file fontcache.cpp.
References FS_BEGIN, FontCache::Get(), and FontCache::HasParent().
Referenced by ShutdownGame().
1.8.1.2