|
OpenTTD Source 20260414-master-g8a7bc482ad
|
Public Member Functions | |
| ~FreeTypeFontCacheFactory () override | |
| Close the freetype library. | |
| std::unique_ptr< FontCache > | LoadFont (FontSize fs, FontType fonttype, bool search, const std::string &font_name, const std::any &os_handle) const override |
| Try loading a font with this factory. | |
| bool | FindFallbackFont (const std::string &language_isocode, class MissingGlyphSearcher *callback) const override |
| We would like to have a fallback font as the current one doesn't contain all characters we need. | |
| Public Member Functions inherited from FontCacheFactory | |
| FontCacheFactory (std::string_view name, std::string_view description) | |
| ~FontCacheFactory () override | |
| Unregister this factory. | |
| Public Member Functions inherited from BaseProvider< FontCacheFactory > | |
| constexpr | BaseProvider (std::string_view name, std::string_view description) |
| Create the provider. | |
| virtual | ~BaseProvider ()=default |
| Ensure the destructor of the sub classes are called as well. | |
| std::string_view | GetName () const |
| Get the name of this provider. | |
| std::string_view | GetDescription () const |
| Get a description of this provider. | |
Static Private Member Functions | |
| static std::unique_ptr< FontCache > | LoadFont (FontSize fs, FT_Face face, std::string_view font_name, uint size) |
Static Private Attributes | |
| static FreeTypeFontCacheFactory | instance |
Additional Inherited Members | |
| Protected Attributes inherited from BaseProvider< FontCacheFactory > | |
| const std::string_view | name |
| The name of the provider. | |
| const std::string_view | description |
| A description of the provider. | |
Definition at line 212 of file freetypefontcache.cpp.
|
inline |
Definition at line 214 of file freetypefontcache.cpp.
|
inlineoverride |
Close the freetype library.
Definition at line 217 of file freetypefontcache.cpp.
|
inlineoverridevirtual |
We would like to have a fallback font as the current one doesn't contain all characters we need.
| 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. Implements FontCacheFactory.
Definition at line 266 of file freetypefontcache.cpp.
References FontConfigFindFallbackFont().
|
inlineoverridevirtual |
Try loading a font with this factory.
| fs | Font size to load. |
| fonttype | Font type requested. |
| search | Set if searching for the font. |
| font_name | Font name to load. |
| os_handle | Font handle to load. |
Implements FontCacheFactory.
Definition at line 223 of file freetypefontcache.cpp.
References Base, Debug, FioFindFullPath(), GetFontByFaceName(), GetFontCacheFontSize(), LoadFont(), and TrueType.
Referenced by LoadFont().
|
inlinestaticprivate |
Definition at line 276 of file freetypefontcache.cpp.
|
staticprivate |
Definition at line 311 of file freetypefontcache.cpp.