https://bugs.winehq.org/show_bug.cgi?id=57420
Bug ID: 57420 Summary: Incorrect (broken) Japanese Font Substitution for Tahoma via FontLink Product: Wine Version: 9.0 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: win32u Assignee: wine-bugs@winehq.org Reporter: rikul@inbox.ru Distribution: ---
Created attachment 77410 --> https://bugs.winehq.org/attachment.cgi?id=77410 Left->FontLink,Right->FontSubstitutes
When configuring the Tahoma font to use a Japanese fallback font via FontLink, issues arise with proper font substitution in Notepad++ and other applications. Here’s a summary of the issue:
1. A FontLink -> SystemLink registry key is added for Tahoma, which includes VL-Gothic-Regular.ttf,VL Gothic among other fonts. 2. The system locale is set to ja_JP.UTF-8. 3. Notepad++ (and other applications) is launched.
Expected Behavior: The Japanese font should display correctly throughout the application interface.
Actual Behavior: - In some parts in Notepad++ where using Tahoma font (e.g., menus), the Japanese font does not display correctly, though in other areas, like the settings window, it does. - We have verified this behavior in other applications, and the same issue is consistently observed. - Without linking to VL Gothic, the Japanese text in menus becomes completely unreadable. VL Gothic is used here as an example for a readable fallback font.
Workaround: Adding a FontSubstitutes registry entry that maps Tahoma to VL Gothic Regular resolves the issue, and the correct font appears throughout the interface.
Problem with the Workaround: This approach is not ideal because changing the system locale does not automatically update the FontSubstitutes entry. As a result, VL Gothic Regular remains set for Tahoma, which is undesirable in an English locale, for example.
Additional Information: - Attached are screenshots showing correct and incorrect font rendering. - Tested on Wine 9.0 as well as the main branch, with consistent behavior in both versions.
https://bugs.winehq.org/show_bug.cgi?id=57420
--- Comment #1 from Rafał Mużyło galtgendo@o2.pl --- Have you tried instead FontSubstitutes entries for MS Gothic/Mincho set instead of Tahoma ?
https://bugs.winehq.org/show_bug.cgi?id=57420
--- Comment #2 from BugSeeker rikul@inbox.ru --- Suggestion in Comment 1 is not working.
The bug relates to a broken FontLink mechanism for Japanese. With FontLink, Japanese characters are recognized but render incorrectly, appearing messy. This seems to be due to a missing settings update or initialization.
When using FontSubstitutes, the characters display clearly.
https://bugs.winehq.org/show_bug.cgi?id=57420
BugSeeker rikul@inbox.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |l@laa.am
https://bugs.winehq.org/show_bug.cgi?id=57420
--- Comment #3 from Rafał Mużyło galtgendo@o2.pl --- Well, my point was slightly different than your take of it.
I was addressing only the part 'Problem with the Workaround', nothing else.
Given that in my personal experience many Japanese programs require FontSubstitutes entries for MS Gothic/Mincho for proper font display, setting them up is only an issue that wine doesn't set them up automatically (and it shouldn't - that font should be user's choice). I have those and they don't interfere with font display in other locales.
IIRC, I've never tinkered with FontLink setting, so no idea about that topic.
https://bugs.winehq.org/show_bug.cgi?id=57420
--- Comment #4 from BugSeeker rikul@inbox.ru --- Could you export and send me your working registry so I can test on it?
https://bugs.winehq.org/show_bug.cgi?id=57420
--- Comment #5 from Rafał Mużyło galtgendo@o2.pl --- Created attachment 77412 --> https://bugs.winehq.org/attachment.cgi?id=77412 a 'template' for the changes
You can use this reg file as a 'template'.
I'm not sure if the Japanese names are still necessary - perhaps it's fixed now - but in the past in a few rare cases they were.
There might be one more catch wrt. theme fonts - I've got a bug for it with a very simple patch. That problem was also addressed by the last patch sent to the mailing list before full gitlab switch, that effectively did the same thing as mine, but it seems it fell into the pavement cracks.
https://bugs.winehq.org/show_bug.cgi?id=57420
--- Comment #6 from Rafał Mużyło galtgendo@o2.pl --- ...note a gotcha though: due to a quirk of MS UI Gothic, there might be no metric compatible replacement for it - while that font is mostly wide, its wide space (U+3000) is narrow, as opposed to most replacements available.
https://bugs.winehq.org/show_bug.cgi?id=57420
--- Comment #7 from BugSeeker rikul@inbox.ru --- Your solution works for me the same way as using FontLink (in other words, it doesn't work correctly), which makes sense because Tahoma references MS Gothic, and we are replacing MS Gothic with VL Gothic. Essentially, this is the same as if I had directly added a link to VL Gothic for Tahoma.
https://bugs.winehq.org/show_bug.cgi?id=57420
--- Comment #8 from Rafał Mużyło galtgendo@o2.pl --- Odd, for me with those keys it looks just like the right hand side...
(I have to correct myself - that other patch (from the mailing list) had been merged awhile ago - I've noticed it at the time, but somehow forgotten it since)
https://bugs.winehq.org/show_bug.cgi?id=57420
--- Comment #9 from Rafał Mużyło galtgendo@o2.pl --- ...or are we just talking past each other and actually acknowledging the same thing - that to make the cjk font look properly in UI you need to add few registry entries for proper font substitution (on top of running in the Japanese locale) ?
https://bugs.winehq.org/show_bug.cgi?id=57420
--- Comment #10 from BugSeeker rikul@inbox.ru --- I'm not entirely sure I understand your point. Could you please provide a step-by-step explanation of how to set this up on a clean Wine installation? It would help clarify things.