-
-
Notifications
You must be signed in to change notification settings - Fork 957
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
Text rendering error under CJK system locale #7511
Comments
Looks like this is #7477, thanks for the detailed report. |
Notes:
|
It may have to do with having an MBCS ANSI locale set since (so far) only users with Chinese or Korean languages have reported this. I'm still on 1803 so I should try switching my ANSI locale and see if that affects language file loading. |
All systems above used config file from Here, which bundles NanumGothic font file. By default, config file will set OpenTTD font to ./font/NanumGothic.ttf and that is causing problem.
I tried to debug that, but vs debug build simply refuses to load ttf file. |
OpenTTD switch to Microsoft's Uniscribe for text layout with the 1.9 release, as the layout component of the previously used ICU library is deprecated and has random crashes. Font rendering is still done using FreeType and not GDI. FreeType will happily try to eat any font it is given, but Uniscribe, being a system components, relies on data provided by Windows, and seems to fail on uninstalled fonts. #6980 would fix that dissonance, but I'd assume Windows would automatically still select an installed font and not the one you want. |
Running the game under a Chinese locale with https://github.com/xupefei/Locale-Emulator reproduces this bug, so we have something to work with now. |
It turns out the language data is being loaded correctly, and conversions from internal UTF-8 to the UTF-16 required by Uniscribe is correct. The problem seems to be somewhere in the shaping process, and it seems that it's (somehow) adding 3 to the value of each glyph number, or something similar to that. |
Although it was marked as Fixed as early as 14 May, but the problem seems to remain in 1.9.3, and my |
Yes, it missed the 1.9 branch, and due to the significance of the fix (completely swapping out the text rendering engine) it couldn't be backported. It will be in the 1.10 release |
Version of OpenTTD
All version above 1.9.0-beta1
Expected result
(Windows 10 RS5)

Actual result
(Win7)

(Win8.1)

(Did't tested Win10 RTM ~ RS1 due to not supported by MS anymore)
(Win10 RS2)

(Win10 RS3)

(Win10 RS4)

Steps to reproduce
Execute OpenTTD 1.9.1 on Korean version of Windows(below Win10 RS5)
All strings are corrupted, even english.lng is not displayed correctly.
OpenTTD 1.8.0 works well, but OpenTTD 1.9.0-beta1 or above doesn't works.
The text was updated successfully, but these errors were encountered: