-
-
Notifications
You must be signed in to change notification settings - Fork 842
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
[Bug]: Game switches to fallback font when refreshing #12664
Comments
I can reproduce this problem on 13.4, so it might be the probelm with my system or the font itself. However I think there should be a I'm afraid that the game automatically determines that the requested font is unuseable when there is only one or two glyphs missing, while the rest are present. A research shows that ~3500 characters are enough to cover over 99% of common text. The required character count might be higher for Traditional Chinese, but will only be lower for Japanese and Korean. |
Problem as it stands is that the game is checking all font sizes, not just the "Normal" font. If any one of those is missing glyphs, it will use the fallback. If you set all of them to "Unifont" via the config (I suspect if you do it in game it will try to fallback after each one, resetting it...) then it will work. My font cache changes should make this work better in future :-) |
Version of OpenTTD
20240511-master-g721cd2b8ad, Windows 11 Home (Simplified Chinese)
Expected result
When changing the font via the
font
command, the game will automatically use the requested font and will not change it after refreshing the game, restarting, or abandoning a game.Actual result
After changing the font via the
font
command, the text does use the glyphs in the requested font; however after restarting or abandoning a game an error message saying "switch to fallback font" appears and the text starts to use the fallback, which, on my system is微软雅黑
(YaHei).Tested with Unifont, Unifont-JP and 寒蝉全圆体 (ChillRound)
fonts.zip
Steps to reproduce
The text was updated successfully, but these errors were encountered: