OpenTTD Source
12.0-beta2
|
Go to the documentation of this file.
13 #include "../../fontcache_internal.h"
29 const void *InternalGetFontTable(uint32 tag,
size_t &length)
override;
30 const Sprite *InternalGetGlyph(
GlyphID key,
bool aa)
override;
37 const char *
GetFontName()
override {
return this->fontname.c_str(); }
uint32 GlyphID
Glyphs are characters from a font.
Win32FontCache(FontSize fs, const LOGFONT &logfont, int pixels)
Create a new Win32FontCache.
Font cache for fonts that are based on a TrueType font.
char32_t WChar
Type for wide characters, i.e.
HGDIOBJ old_font
Old font selected into the GDI context.
HFONT font
The font face associated with this font.
void LoadWin32Font(FontSize fs)
Loads the GDI font.
HDC dc
Cached GDI device context.
void ClearFontCache() override
Reset cached glyphs.
const char * GetFontName() override
Get the name of this font.
const FontSize fs
The size of the font.
LOGFONT logfont
Logical font information for selecting the font face.
Font cache for fonts that are based on a Win32 font.
SIZE glyph_size
Maximum size of regular glyphs.
const void * GetOSHandle() override
Get the native OS font handle, if there is one.
GlyphID MapCharToGlyph(WChar key) override
Map a character into a glyph.
FontSize
Available font sizes.
Data structure describing a sprite.
std::string fontname
Cached copy of this->logfont.lfFaceName.