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
"medium_font" setting is not applied properly in korean #7615
Comments
Please also test with nightlies, some changes related to fonts on windows are not in releases |
@glx22 Thanks for noticing me, I forgot that nightlies has been changed about fonts. |
Hi @telk5093 , Sorry it took us so long to get back to you. I looked into your issue, and either it is already fixed over the years, or I do not understand the problem correctly :) If I use your font and start the game with 1 config over the other, I can clearly see that (forgive me doing this in English; I am pretty sure I get lost in Korean :D). Would you be able to test this with latest nightly: https://www.openttd.org/downloads/openttd-nightlies/latest.html If so, can you help me out exactly what you expect to happen and what happens? The screenshots are not all that clear to me, in what you expect vs what you get, sorry about that :) Thank you! |
@TrueBrain Thanks for reviewing this issue even time has flowed. But the above image is made by Photoshop, not the actual game screenshot.
Not only Font settings what was successful were these:
I have no idea why truetype font setting is not working at 1.10.x while it worked in the past. Thank you :) |
Thank you for this much detail, that is really appreciated. After some digging and looking around, the problem is a bit complicated. On start-up, OpenTTD validates fonts to see if it has all the glyphs of all the strings we will be rendering. If it finds any glyph missing, it doesn't tell you, but loads the system fallback. This is very confusing, and results in you trying different paths to the font, while the font itself is the problem. Sorry about that ... The real problem: your I am preparing a change in the code, that gives a bit more helpful indication what is going on. First, it will display this to the console:
Second, in-game it will show you a window: That hopefully helps you a bit more what is going on, and that it has little to do with where the font is located. This hopefully also helps you to resolve this issue. For the difference between 1.9 and the nightly, that I do not understand fully. It might be that we now also use a NBSP for small or large font; that might explain why Sorry for the trouble, and let me know if there is anything else I can help you with :) |
If so, most of true type fonts what I tested might have missing glyphs, it sounds too bad. Would it be impossible to use the way using some alternative font if such glyphs are missing? Anyway thanks again! |
Well, I am as surprised as you are that these things are not supplied, I have to admit :D I had to look it up in the TTF itself to ensure myself they are really not there :P You can see A3 and A9 really are not in the font :D Silly, really.
Oops, misread you. Gulim was one that was working. Do you have any other font for me that isn't? |
Here's some fonts that does not work: |
I tested Would you mind start OpenTTD with -dfreetype=2 as argument to the application, and let me know what the console is telling you? That would allow me to get a peek what your system is doing :) Tnx! |
Tried to
|
|
Oh, you meant
|
No worries, it just meant I had to test yet-another-font :P I am just being lazy :) Okay, I was testing only English language, as I assume such fonts at least do all Korean glyphs. I was wrong:
Yeah, let me ask if someone can review the PR, so you get these nicer errors too .. :D |
Oops, didn't mean to close this already, but okay. In the new nightly of today (which will run in ~6 hours from now), there is code to tell you why it failed to load the fonts. Hopefully this helps you out a bit finding a font that implements all glyphs. I understand this is far from ideal, but I also don't really know what to do otherwise. We can't just do a font partial .. can you see if with this extra information you have sufficient information to find a suitable font? Sorry for the trouble that is called fonts ... |
Even though it is too sad that it's impossible to use all font, I can find what font is suitable with |
No problem! If this is sufficient for you, I will be closing the ticket for real now :D Hopefully you can help the Korean community with some nice working fonts :D |
Version of OpenTTD
1.9.1 and recent nightlies
Expected result
Font must be seemed like readme's fonts (="mono_font" setting)
Actual result
Steps to reproduce
and both ttf files stored into ./font/ directory under the directory which openttd.exe is.
It's been a long time problem as korean users to set fonts correctly in OpenTTD, and I have provided korean users to proper openttd.cfg file to users who suffer as font errors.
But recently, I have noticed that only medium_font setting in openttd.cfg works differently.
I had tried to change my game font as KoPubBatangLight (by someone's request),
but the only medium_font is not applied.
The only korean fonts that is applied as medium_font are default Windows fonts such as Gulim, Dotum or NanumGothic (which I attached, not a default) as I know.
As you can see above actual result, small/large/mono_font setting works very fine for me, but not for medium_font.
The questions are:
medium_font = C:\\Windows\\Fonts\\KoPubBatangLight.ttf
, it was the same. Single backslash was the same.The text was updated successfully, but these errors were encountered: