-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better algorithm for font choosing #7
Conversation
7a74136
to
4ae85d9
Compare
4ae85d9
to
4631624
Compare
|
||
#ifdef Q_OS_WIN | ||
auto list = QStringList(); | ||
list.append("Microsoft YaHei"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why it's Microsoft Yahei instead of Microsoft Yahei UI just like other fonts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I took a list of fonts from FontMod readme
AFAIK, every Windows system has For example, for Traditional Chinese, |
Qt doesn't prioritize them in any locale. I.e. if these substitutions will be only for japanese/chinese/korean locale, users with english locale will get the old fonts from winxp, as it was before substiutions. |
The issue here is system with Japanese / Tradition Chinese language will use Microsoft YaHei (not |
No, Qt has 5 lists and it's selected based on The best solution is to use system "MessageFont", it's implemented but disabled for Qt 5: |
According to your list, it is old winxp fonts, as I said:
|
btw @ysc3839 thank you for the link, now we can patch Qt instead of substituions, I sent it to @john-preston |
What Qt 5 does is not perfect, but it's right. Use Simplified Chinese font for Japanese is not right. Telegram 2.0.1 (Japanese System): Telegram 2.1 (Japanese System): You can see the wrong glyph displayed in Telegram 2.1 (Japanese System). I'm not familiar with Qt, but I guess @ysc3839 means you can use Qt 6's method (call WinApi SystemParametersInfo, https://github.com/qt/qtbase/blob/44e8c90ad4ae5a3d08651a61ac9f0937fb49d26b/src/platformsupport/fontdatabases/windows/qwindowsfontdatabasebase.cpp#L767) to get default GUI font, and set it as the fallback font. |
🤔 |
No description provided.