From de35961bb4a14911f64d862448754a245d310d1d Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Thu, 17 Apr 2025 17:20:08 +0500 Subject: [PATCH] qt: Use Yu Gothic UI as the Japanese font on Windows 10 and later --- src/qt/qt_progsettings.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/qt/qt_progsettings.cpp b/src/qt/qt_progsettings.cpp index 0fce0d705..aa9bbe97b 100644 --- a/src/qt/qt_progsettings.cpp +++ b/src/qt/qt_progsettings.cpp @@ -26,6 +26,10 @@ #include #include #include +#ifdef Q_OS_WINDOWS +# include +# include +#endif extern "C" { #include <86box/86box.h> @@ -115,7 +119,11 @@ ProgSettings::getFontName(uint32_t lcid) case 0x0404: /* zh-TW */ return "Microsoft JhengHei"; case 0x0411: /* ja-JP */ - return "Meiryo UI"; + /* Check for Windows 10 or later to choose the appropriate system font */ + if (QVersionNumber::fromString(QSysInfo::kernelVersion()).majorVersion() >= 10) + return "Yu Gothic UI"; + else + return "Meiryo UI"; case 0x0412: /* ko-KR */ return "Malgun Gothic"; case 0x0804: /* zh-CN */