|
OpenTTD Source 20260414-master-g8a7bc482ad
|
Functions related to detecting/finding the right font. More...
Go to the source code of this file.
Functions | |
| FT_Error | GetFontByFaceName (std::string_view font_name, FT_Face *face) |
| Load a freetype font face with the given font name. | |
| bool | FontConfigFindFallbackFont (const std::string &language_isocode, MissingGlyphSearcher *callback) |
| Use FontConfig to find a fallback font. | |
Functions related to detecting/finding the right font.
Definition in file font_unix.h.
| bool FontConfigFindFallbackFont | ( | const std::string & | language_isocode, |
| MissingGlyphSearcher * | callback ) |
Use FontConfig to find a fallback font.
| 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. Definition at line 148 of file font_unix.cpp.
References FontCache::AddFallback(), Debug, FromFcString(), GetPreferredWeightDistance(), MissingGlyphSearcher::missing_fontsizes, MissingGlyphSearcher::missing_glyphs, Monospace, BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Test(), and ToFcString().
Referenced by FreeTypeFontCacheFactory::FindFallbackFont().
| FT_Error GetFontByFaceName | ( | std::string_view | font_name, |
| FT_Face * | face ) |
Load a freetype font face with the given font name.
| font_name | The name of the font to load. |
| face | The face that has been found. |
Definition at line 70 of file font_unix.cpp.
References FromFcString(), SplitFontFamilyAndStyle(), StrEqualsIgnoreCase(), and ToFcString().
Referenced by FreeTypeFontCacheFactory::LoadFont().