|
OpenTTD Source 20260218-master-g2123fca5ea
|
Factory for FontCaches. More...
#include <fontcache.h>
Public Member Functions | |
| FontCacheFactory (std::string_view name, std::string_view description) | |
| virtual std::unique_ptr< FontCache > | LoadFont (FontSize fs, FontType fonttype) const =0 |
| Try loading a font with this factory. | |
| virtual bool | FindFallbackFont (struct FontCacheSettings *settings, const std::string &language_isocode, class MissingGlyphSearcher *callback) const =0 |
| We would like to have a fallback font as the current one doesn't contain all characters we need. | |
| Public Member Functions inherited from BaseProvider< FontCacheFactory > | |
| constexpr | BaseProvider (std::string_view name, std::string_view description) |
| std::string_view | GetName () const |
| std::string_view | GetDescription () const |
Additional Inherited Members | |
| Protected Attributes inherited from BaseProvider< FontCacheFactory > | |
| const std::string_view | name |
| const std::string_view | description |
Factory for FontCaches.
Definition at line 232 of file fontcache.h.
|
inline |
Definition at line 234 of file fontcache.h.
|
inlineoverride |
Definition at line 239 of file fontcache.h.
|
pure virtual |
We would like to have a fallback font as the current one doesn't contain all characters we need.
This function must set all fonts of settings.
| settings | The settings to overwrite the fontname of. |
| language_isocode | The language, e.g. en_GB. |
| callback | The function to call to check for missing glyphs. |
true if a font has been set, false otherwise. Implemented in CoreTextFontCacheFactory, FreeTypeFontCacheFactory, SpriteFontCacheFactory, and Win32FontCacheFactory.
References settings.
|
pure virtual |
Try loading a font with this factory.
Implemented in CoreTextFontCacheFactory, FreeTypeFontCacheFactory, SpriteFontCacheFactory, and Win32FontCacheFactory.