https://bugs.kde.org/show_bug.cgi?id=465384

Asahi Lina <l...@asahilina.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |l...@asahilina.net

--- Comment #10 from Asahi Lina <l...@asahilina.net> ---
It is! I was just running into this and I found the solution.

I have the opposite problem in Fedora (I want Japanese and I'm getting
Chinese), and I tracked it down to having Droid Sans Fallback installed (which
uses Chinese glyphs), but then the behavior is inconsistent between Qt and
other fontconfig apps. If you don't have that font, it just picks a random CJK
font, which completely by chance happens to be the JP one. Fontconfig itself
will also do that and ignore Droid Sans Fallback due to a language mismatch (it
uses different logic to Qt). So really, the default is totally inconsistent and
random-ish when there is no Han language preference.

This is the solution:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
<fontconfig>
  <match target="pattern">
    <edit name="lang" mode="append"><string>ja</string></edit>
  </match>
</fontconfig>

What that does is add "ja" to the list of languages being matched, after the
existing list (which should be derived from the system primary language list).
So that would cause the system to fall back to Japanese fonts. If the Noto Sans
CJK fonts are correctly configured as fallbacks for their respective language
(they are in Fedora), then that all works, and you don't need to specify
specific fonts or anything like that. Of course it's up to distros to configure
language-specific fallback correctly, but I think that's something they would
have to do to support the normal use case of the primary language being a CJK
one, so hopefully they do that properly!

I think KDE should always add all the languages configured in Regional Settings
> Language to ~/.fonts.conf or similar like that (including the primary one).
Then whatever language the normal mechanisms choose will still take precedence,
but then after that fontconfig will try the user-configured languages in
Plasma, and then the font fallback order should be correct. So it will work
like in Windows/Android.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to