From e24eaa6b32799119caa78caacd57216f81d3e1a7 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Mon, 11 Sep 2023 08:04:41 +0400 Subject: [PATCH] Produce a nice terminal warning about lack of patched fonts --- ui/style/style_core_font.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ui/style/style_core_font.cpp b/ui/style/style_core_font.cpp index 4ca722c..4ed7089 100644 --- a/ui/style/style_core_font.cpp +++ b/ui/style/style_core_font.cpp @@ -18,6 +18,10 @@ #include #include +#if __has_include() +#include +#endif + void style_InitFontsResource() { #ifdef Q_OS_MAC // Use resources from the .app bundle on macOS. @@ -223,7 +227,11 @@ void StartFonts() { QFont::insertSubstitutions(name, list); } #endif // Q_OS_MAC -#endif // !DESKTOP_APP_USE_PACKAGED_FONTS +#elif __has_include() // !DESKTOP_APP_USE_PACKAGED_FONTS + g_warning( + "Unable to load patched fonts with Qt workarounds, " + "expect font issues."); +#endif // DESKTOP_APP_USE_PACKAGED_FONTS auto appFont = QApplication::font(); appFont.setStyleStrategy(QFont::PreferQuality);