qt: Use Yu Gothic UI as the Japanese font on Windows 10 and later

This commit is contained in:
Alexander Babikov
2025-04-17 17:20:08 +05:00
parent 4160fd6a5a
commit de35961bb4

View File

@@ -26,6 +26,10 @@
#include <QDir>
#include <QFile>
#include <QLibraryInfo>
#ifdef Q_OS_WINDOWS
# include <QSysInfo>
# include <QVersionNumber>
#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 */