1
0
Fork 0

Codechange: Expose IsDefaultFont() in fontcache.cpp

pull/12690/head
Sadie del Solar 2024-07-01 17:05:40 -07:00
parent 46ebb42fa8
commit c172a24dc9
2 changed files with 3 additions and 1 deletions

View File

@ -199,9 +199,10 @@ void SetFont(FontSize font_size, const std::string &font, uint size)
/**
* Test if a font setting uses the default font.
* @param setting The font setting to check.
* @return true iff the font is not configured and no fallback font data is present.
*/
static bool IsDefaultFont(const FontCacheSubSetting &setting)
bool IsDefaultFont(const FontCacheSubSetting &setting)
{
return setting.font.empty() && setting.os_handle == nullptr;
}

View File

@ -232,6 +232,7 @@ std::string GetFontCacheFontName(FontSize fs);
void DebugPrintFontSettings(const std::string &desc);
bool GetFontAAState();
void InitFontCache();
bool IsDefaultFont(const FontCacheSubSetting &setting);
void ResizeFont(FontSize font_size, uint size);
void SetFont(FontSize fontsize, const std::string &font, uint size);
void UninitFontCache();