FSUI: Load all language fonts at all times
Description of Changes
- Allow use of system fonts
- Load all language fonts instead of just the one supported by the current locale
- mmap fonts instead of copying them into memory
- Enable non-English game titles in FSUI
- Allow slightly wider title strings on horizontal FSUI buttons
- Center icons in their buttons on the FSUI nav bar
Fixes #12804
Rationale behind Changes
- No more prompts to download fonts when using non-latin languages unless your system is missing that font
- Don't need to ship 25MB Noto Color Emoji on Windows (still needed on macOS and Linux)
- Can use non-English game titles in FSUI
- Non-English characters in paths render properly in FSUI
- Save ~75MB of ram when using the 25MB Noto Color Emoji font
Suggested Testing Steps
- Delete any downloaded fonts from your PCSX2 directory
- Make sure you don't get prompted to download any fonts (unless on Linux and don't have Noto fonts)
- Make sure non-English game titles render properly in FSUI
- Make sure fonts look nice in your language in FSUI (Arabic is still broken, sorry)
- Make sure line height looks reasonable everywhere in FSUI (lines shouldn't look like they're squished against each other)
Notes
- Font sizes have changed for non-latin fonts. Translators will need to re-check FSUI to make sure their translations still fit.
- Linux packagers should add Noto Sans {CJK, Arabic, Hebrew, Devanagari} to the recommended dependencies of their packages.
Did you use AI to help find, test, or implement this issue or feature?
No
I have a question: instead of relying on Noto Color Emoji, can’t it instead just take the OS’s color emoji font and work with that? Then there is no longer a need to include Noto just for some emojis.
I have a question: instead of relying on Noto Color Emoji, can’t it instead just take the OS’s color emoji font and work with that? Then there is no longer a need to include Noto just for some emojis.
It does that on Windows.
Apple Color Emoji isn't currently renderable, since it's bitmap based, which isn't supported by imgui+Freetype.
Most Linux distros ship Noto Color Emoji, but it comes in Bitmap, SVG, and COLRv1 versions and SVG is the only one imgui supports. That's the biggest of the three, so most Linux distros do not ship it. Fedora recently switched from Bitmap to COLRv1, neither of which we can render.
Can you perhaps respond to them given it's relevance to your patch?
Done