From 286399461bb522bf32a893e1d1c7cdba311a7834 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Sat, 12 Feb 2022 01:50:04 +0600 Subject: [PATCH 1/2] qt: Set font immediately after QApplication initialization --- src/qt/qt_main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/qt/qt_main.cpp b/src/qt/qt_main.cpp index 9ce65411f..e24b81283 100644 --- a/src/qt/qt_main.cpp +++ b/src/qt/qt_main.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #ifdef QT_STATIC /* Static builds need plugin imports */ @@ -139,6 +140,11 @@ int main(int argc, char* argv[]) { #endif QApplication app(argc, argv); QLocale::setDefault(QLocale::C); +#ifdef Q_OS_WINDOWS + auto font_name = QObject::tr("FONT_NAME"); + auto font_size = QObject::tr("FONT_SIZE"); + QApplication::setFont(QFont(font_name, font_size.toInt())); +#endif qt_set_sequence_auto_mnemonic(false); Q_INIT_RESOURCE(qt_resources); Q_INIT_RESOURCE(qt_translations); From c2ec86a11116415ae343da363e537b28ca7609be Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Sat, 12 Feb 2022 01:50:50 +0600 Subject: [PATCH 2/2] Update qt_main.cpp --- src/qt/qt_main.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/qt/qt_main.cpp b/src/qt/qt_main.cpp index e24b81283..150dae8ed 100644 --- a/src/qt/qt_main.cpp +++ b/src/qt/qt_main.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #ifdef QT_STATIC /* Static builds need plugin imports */