OpenTTD Source
20240919-master-gdf0233f4c2
|
Go to the documentation of this file.
13 #include "../../core/alloc_type.hpp"
14 #include "../../fontcache/truetypefontcache.h"
31 void SetFontSize(
int pixels);
34 const Sprite *InternalGetGlyph(
GlyphID key,
bool aa)
override;
Win32FontCache(FontSize fs, const LOGFONT &logfont, int pixels)
Create a new Win32FontCache.
Font cache for fonts that are based on a TrueType font.
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.
uint32_t GlyphID
Glyphs are characters from a 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.
std::string GetFontName() override
Get the name of this font.
GlyphID MapCharToGlyph(char32_t key, bool allow_fallback=true) override
Map a character into a glyph.
SIZE glyph_size
Maximum size of regular glyphs.
const void * GetOSHandle() override
Get the native OS font handle, if there is one.
FontSize
Available font sizes.
Data structure describing a sprite.
ReusableBuffer< uint8_t > render_buffer
Temporary buffer for rendering glyphs.
std::string fontname
Cached copy of loaded font facename.