Closed guoyunhe closed 10 months ago
Unfortunately working as expected - there's no straightforward way to query fonts to use for non-latin glyphs on Linux.
It works fine on Windows/Mac. My plan was to just ship fonts alongside, but that would bloat the download size by like 30MB..
@stenzek Is font-config an option?
I took a brief look at the API a while back and it didn't seem very friendly.
I think long-term the best option probably is to just ship the fonts, or, make them downloadable at runtime. That way we have consistency across all platforms, and don't run into spacing issues, which are particularly problematic in Big Picture.
Leaning towards the downloadable option - we can make it semi-automatic.
@stenzek I use AetherSX2 on Android and its OSD doesn't have this issue. Maybe it is implemented in a different way. If the OSD itself is written in Qt, I guess you don't need to care about fonts and languages?
The OSD is not written in Qt, it uses ImGui to render. It is not possible to use Qt to render the OSD, the core takes over the surface. And we wouldn't want to anyway, since it'd be detrimental to performance.
The issue here is that the OSD strings are translated, and it's trying to display non-latin characters from a font that does not support it, because Linux does not have a font: https://github.com/PCSX2/pcsx2/blob/ec12d9b657ce34891640749309f038892982c635/pcsx2-qt/Translations.cpp#L354-L380 (field order is font for windows, linux, mac).
That's why it works fine on Windows:
I took a brief look at the API a while back and it didn't seem very friendly.
I think long-term the best option probably is to just ship the fonts, or, make them downloadable at runtime. That way we have consistency across all platforms, and don't run into spacing issues, which are particularly problematic in Big Picture.
Leaning towards the downloadable option - we can make it semi-automatic.
Can you add an option to set the font so that the user can add the font file themselves? I had the same problem on steamdeck, it was running archlinux and in big picture mode it showed some "?" It is worth mentioning that both pcsx2 and duckstation have the same problem.
No, I'm going to make the fonts auto download. Just haven't had a chance to implement it yet.
@stenzek here is a problem that China blocks GitHub downloads heavily. So I got this error (without a VPN):
Could you use some free hosting like https://www.netlify.com/
Sorry, that's entirely out of our control. We could pull from Google Fonts, but then I suspect you'd run into the same issue.
Our main binary downloads are from GitHub too, so if you can't download the font, it's unlikely you'll be able to download PCSX2 either.
You can always manually download the file and add it.
@stenzek I just updated the last version. After downloading the fonts, the large screen mode can display the fonts normally. Thank you for your efforts.
@guoyunhe 网络的问题自己想办法解决吧,找个便宜的机场一年也就一包烟钱。
Describe the Bug
My System is openSUSE Linux in Chinese. All Qt UI shows Chinese fonts as normal. But the OSD shows only question mark ????
Reproduction Steps
Expected Behavior
Chinese texts should be shown as normal
PCSX2 Revision
1.7.5371
Operating System
Linux (64bit) - Specify distro below
If Linux - Specify Distro
openSUSE Tumbleweed
Logs & Dumps
No response