Produce a nice terminal warning about lack of patched fonts
This commit is contained in:
parent
1ba24ed511
commit
e24eaa6b32
1 changed files with 9 additions and 1 deletions
|
|
@ -18,6 +18,10 @@
|
|||
#include <QtGui/QFontDatabase>
|
||||
#include <QtWidgets/QApplication>
|
||||
|
||||
#if __has_include(<glib.h>)
|
||||
#include <glib.h>
|
||||
#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(<glib.h>) // !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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue