From c172a24dc91ef999edc416c1f96046f50ae22646 Mon Sep 17 00:00:00 2001 From: Sadie del Solar Date: Mon, 1 Jul 2024 17:05:40 -0700 Subject: [PATCH] Codechange: Expose IsDefaultFont() in fontcache.cpp --- src/fontcache.cpp | 3 ++- src/fontcache.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/fontcache.cpp b/src/fontcache.cpp index 071ca34472..31a167c53c 100644 --- a/src/fontcache.cpp +++ b/src/fontcache.cpp @@ -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; } diff --git a/src/fontcache.h b/src/fontcache.h index b1105acbe2..8adb7a672c 100644 --- a/src/fontcache.h +++ b/src/fontcache.h @@ -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();