From b00434f1d952534146cc891b64a62cb7606c8988 Mon Sep 17 00:00:00 2001 From: Guy Scharf Date: Thu, 14 Jan 2021 13:40:29 -0700 Subject: [PATCH] Add diagnostics when setting application font To help resolve font setting problem on RPi4 --- oscar/SleepLib/common.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/oscar/SleepLib/common.cpp b/oscar/SleepLib/common.cpp index 496259d2..086eda8b 100644 --- a/oscar/SleepLib/common.cpp +++ b/oscar/SleepLib/common.cpp @@ -349,6 +349,8 @@ void validateFont (QString which, int size, bool bold, bool italic) { if (testFont.length() > 0 && installedFontFamilies.indexOf(testFont) >= 0) { desiredFont = testFont; forceFont = false; + } else { + qDebug() << testFont << size << "not found, substituting" << desiredFont << size; } } @@ -376,6 +378,7 @@ void setApplicationFont () { font.setItalic(((*p_pref)["Fonts_Application_Italic"]).toBool()); QApplication::setFont(font); mainwin->menuBar()->setFont(font); + qDebug() << "Application font set to" << font << "system now says" << QFontDatabase::systemFont(QFontDatabase::GeneralFont).family(); } bool removeDir(const QString &path)