diff options
| -rw-r--r-- | src/yuzu/main.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 4146ebc2c..f45a25410 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp | |||
| @@ -262,6 +262,18 @@ static QString PrettyProductName() { | |||
| 262 | return QSysInfo::prettyProductName(); | 262 | return QSysInfo::prettyProductName(); |
| 263 | } | 263 | } |
| 264 | 264 | ||
| 265 | #ifdef _WIN32 | ||
| 266 | static void OverrideWindowsFont() { | ||
| 267 | // Qt5 chooses these fonts on Windows and they have fairly ugly alphanumeric/cyrllic characters | ||
| 268 | // Asking to use "MS Shell Dlg 2" gives better other chars while leaving the Chinese Characters. | ||
| 269 | const QString startup_font = QApplication::font().family(); | ||
| 270 | const QStringList ugly_fonts = {QStringLiteral("SimSun"), QStringLiteral("PMingLiU")}; | ||
| 271 | if (ugly_fonts.contains(startup_font)) { | ||
| 272 | QApplication::setFont(QFont(QStringLiteral("MS Shell Dlg 2"), 9, QFont::Normal)); | ||
| 273 | } | ||
| 274 | } | ||
| 275 | #endif | ||
| 276 | |||
| 265 | bool GMainWindow::CheckDarkMode() { | 277 | bool GMainWindow::CheckDarkMode() { |
| 266 | #ifdef __linux__ | 278 | #ifdef __linux__ |
| 267 | const QPalette test_palette(qApp->palette()); | 279 | const QPalette test_palette(qApp->palette()); |
| @@ -4137,6 +4149,10 @@ int main(int argc, char* argv[]) { | |||
| 4137 | QCoreApplication::setAttribute(Qt::AA_DontCheckOpenGLContextThreadAffinity); | 4149 | QCoreApplication::setAttribute(Qt::AA_DontCheckOpenGLContextThreadAffinity); |
| 4138 | QApplication app(argc, argv); | 4150 | QApplication app(argc, argv); |
| 4139 | 4151 | ||
| 4152 | #ifdef _WIN32 | ||
| 4153 | OverrideWindowsFont(); | ||
| 4154 | #endif | ||
| 4155 | |||
| 4140 | // Workaround for QTBUG-85409, for Suzhou numerals the number 1 is actually \u3021 | 4156 | // Workaround for QTBUG-85409, for Suzhou numerals the number 1 is actually \u3021 |
| 4141 | // so we can see if we get \u3008 instead | 4157 | // so we can see if we get \u3008 instead |
| 4142 | // TL;DR all other number formats are consecutive in unicode code points | 4158 | // TL;DR all other number formats are consecutive in unicode code points |