|
OpenTTD Source 20251213-master-g1091fa6071
|
Public Member Functions | |
| std::unique_ptr< FontCache > | LoadFont (FontSize fs, FontType fonttype, bool search, const std::string &font, std::span< const std::byte > os_handle) const override |
| Loads the freetype font. | |
| bool | FindFallbackFont (const std::string &language_isocode, FontSizes fontsizes, MissingGlyphSearcher *callback) const override |
Public Member Functions inherited from FontCacheFactory | |
| FontCacheFactory (std::string_view name, std::string_view description) | |
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 |
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 |
| const std::string_view | description |
Definition at line 206 of file freetypefontcache.cpp.
|
inline |
Definition at line 208 of file freetypefontcache.cpp.
|
inlinevirtual |
Definition at line 210 of file freetypefontcache.cpp.
|
inlineoverridevirtual |
Implements FontCacheFactory.
Definition at line 266 of file freetypefontcache.cpp.
|
inlineoverridevirtual |
Loads the freetype font.
First try to load the fontname as if it were a path. If that fails, try to resolve the filename of the font using fontconfig, where the format is 'font family name' or 'font family name, font style'.
| fs | The font size to load. |
Implements FontCacheFactory.
Definition at line 223 of file freetypefontcache.cpp.
References BASE_DIR, 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.