OpenTTD Source 20260208-master-g43af8e94d0
font_unix.h File Reference

Functions related to detecting/finding the right font. More...

#include "../../fontcache.h"
#include <ft2build.h>
#include <FT_FREETYPE_H>

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 (FontCacheSettings *settings, const std::string &language_isocode, MissingGlyphSearcher *callback)

Detailed Description

Functions related to detecting/finding the right font.

Definition in file font_unix.h.

Function Documentation

◆ FontConfigFindFallbackFont()

bool FontConfigFindFallbackFont ( FontCacheSettings * settings,
const std::string & language_isocode,
MissingGlyphSearcher * callback )

Definition at line 142 of file font_unix.cpp.

◆ GetFontByFaceName()

FT_Error GetFontByFaceName ( std::string_view font_name,
FT_Face * face )

Load a freetype font face with the given font name.

Parameters
font_nameThe name of the font to load.
faceThe face that has been found.
Returns
The error we encountered.

Definition at line 70 of file font_unix.cpp.

References FromFcString(), SplitFontFamilyAndStyle(), StrEqualsIgnoreCase(), and ToFcString().

Referenced by FreeTypeFontCacheFactory::LoadFont().