|
OpenTTD Source
13.0-beta2
|
Go to the documentation of this file.
21 static const int _default_font_ascender[FS_END] = { 8, 5, 15, 8};
30 ascender(_default_font_ascender[fs]), descender(_default_font_ascender[fs] -
_default_font_height[fs]),
46 int FontCache::GetDefaultFontHeight(
FontSize fs)
68 bool GetFontAAState(
FontSize size,
bool check_blitter)
74 default: NOT_REACHED();
90 if (monospace != (fs ==
FS_MONO))
continue;
101 #elif defined(WITH_COCOA)
131 if (!
FontCache::Get(fs)->IsBuiltInFont() && GetFontAAState(fs,
false))
return true;
137 #if !defined(_WIN32) && !defined(__APPLE__) && !defined(WITH_FONTCONFIG) && !defined(WITH_COCOA)
static const int _default_font_height[FS_END]
Default heights for the different sizes of fonts.
A searcher for missing glyphs.
int GetHeight() const
Get the height of the font.
bool aa
Whether to do anti aliasing or not.
@ FS_LARGE
Index of the large font in the font tables.
static void ResetFontCache(FontSize size)
Reset cached font information.
Font cache for fonts that are based on a freetype font.
void LoadFreeTypeFont(FontSize fs)
Loads the freetype font.
void UninitFontCache()
Free everything allocated w.r.t.
void UninitFreeType()
Free everything allocated w.r.t.
Settings for the four different fonts.
bool HasParent()
Check whether the font cache has a parent.
@ FS_NORMAL
Index of the normal font in the font tables.
void LoadWin32Font(FontSize fs)
Loads the GDI font.
@ FS_SMALL
Index of the small font in the font tables.
bool HasAntialiasedFonts()
Should any of the active fonts be anti-aliased?
void InitFontCache(bool monospace)
(Re)initialize the font cache related things, i.e.
FontCacheSubSetting large
The largest font; mostly used for newspapers.
static Blitter * GetCurrentBlitter()
Get the current active blitter (always set by calling SelectBlitter).
virtual ~FontCache()
Clean everything up.
FontCacheSubSetting medium
The normal font size.
fluid_settings_t * settings
FluidSynth settings handle.
const FontSize fs
The size of the font.
static FontCache * caches[FS_END]
All the font caches.
Font cache for basic fonts.
bool SetFallbackFont(struct FontCacheSettings *settings, const char *language_isocode, int winlangid, class MissingGlyphSearcher *callback)
We would like to have a fallback font as the current one doesn't contain all characters we need.
FontCache * parent
The parent of this font cache.
FontCacheSubSetting mono
The mono space font used for license/readme viewers.
int GetCharacterHeight(FontSize size)
Get height of a character for a given font size.
@ FS_MONO
Index of the monospaced font in the font tables.
FontSize
Available font sizes.
void LoadCoreTextFont(FontSize fs)
Loads the TrueType font.
FontCacheSubSetting small
The smallest font; mostly used for zoomed out view.
FontCache(FontSize fs)
Create a new font cache.
static FontCache * Get(FontSize fs)
Get the font cache of a given font size.