summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKyle Kienapfel <Docteh@users.noreply.github.com>2022-10-02 00:27:23 +0200
committerKyle Kienapfel <Docteh@users.noreply.github.com>2022-10-02 00:27:23 +0200
commit1dba5fab626b2b441d069a668fd148232384da14 (patch)
treebf55045acd046958e462a3061fe4a4b450993a65
parentMerge pull request #8876 from FearlessTobi/multiplayer-part3 (diff)
downloadyuzu-1dba5fab626b2b441d069a668fd148232384da14.tar
yuzu-1dba5fab626b2b441d069a668fd148232384da14.tar.gz
yuzu-1dba5fab626b2b441d069a668fd148232384da14.tar.bz2
yuzu-1dba5fab626b2b441d069a668fd148232384da14.tar.lz
yuzu-1dba5fab626b2b441d069a668fd148232384da14.tar.xz
yuzu-1dba5fab626b2b441d069a668fd148232384da14.tar.zst
yuzu-1dba5fab626b2b441d069a668fd148232384da14.zip
-rw-r--r--src/yuzu/main.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index 612b8dbb8..fc094ea1d 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -261,6 +261,18 @@ static QString PrettyProductName() {
return QSysInfo::prettyProductName();
}
+#ifdef _WIN32
+static void OverrideWindowsFont() {
+ // Qt5 chooses these fonts on Windows and they have fairly ugly alphanumeric/cyrllic characters
+ // Asking to use "MS Shell Dlg 2" gives better other chars while leaving the Chinese Characters.
+ const QString startup_font = QApplication::font().family();
+ const QStringList ugly_fonts = {QStringLiteral("SimSun"), QStringLiteral("PMingLiU")};
+ if (ugly_fonts.contains(startup_font)) {
+ QApplication::setFont(QFont(QStringLiteral("MS Shell Dlg 2"), 9, QFont::Normal));
+ }
+}
+#endif
+
bool GMainWindow::CheckDarkMode() {
#ifdef __linux__
const QPalette test_palette(qApp->palette());
@@ -4134,6 +4146,10 @@ int main(int argc, char* argv[]) {
QCoreApplication::setAttribute(Qt::AA_DontCheckOpenGLContextThreadAffinity);
QApplication app(argc, argv);
+#ifdef _WIN32
+ OverrideWindowsFont();
+#endif
+
// Workaround for QTBUG-85409, for Suzhou numerals the number 1 is actually \u3021
// so we can see if we get \u3008 instead
// TL;DR all other number formats are consecutive in unicode code points