Talk:Localization/Simplified Chinese

From ArchWiki

After configuration, Noto Serif CJK JP is still preferred.

The wiki config of 64-language-selector-prefer.conf may not be enough for the (Japanese) glyphs problem with noto-fonts-cjk installed.


'fc-match -s' shows that "Noto Serif CJK JP" is still preferred, command result contains: NotoSerifCJK-Regular.ttc: "Noto Serif CJK JP" "Regular" Ws arch (talk) 09:02, 26 March 2024 (UTC)Reply[reply]

First of all, I don't think I can reproduce that without further information. (I use a different and more complex configuration file and it works for me.) Second of all, maybe it would've been better if you've asked in a forum.
Anyway, maybe first check if your XML file is a valid one (check for syntax errors!), then make sure no other files have higher priorities (see the numbers the filename begins with in /etc/fonts/conf.d/ too), then try replacing it in /etc/fonts/local.conf.
If nothing works, then yeah… that'd be really weird. — windowsboy111 (talk) 09:49, 17 April 2024 (UTC)Reply[reply]
The configuration in this wiki for noto-fonts-cjk only sets sans-serif and monospace font family. Maybe Noto Serif CJK JP does not belong to them. Ws arch (talk) 01:29, 18 April 2024 (UTC)Reply[reply]
I'm not so sure what you mean exactly. Supposedly "Noto Serif CJK JP" is a Serif font. If you've only made configurations for monospace and sans-serif, then they don't cover Serif fonts. You'll need to also override the Serif font configurations:
/etc/fonts/local.conf
<fontconfig>
<!-- Insert the other font families here -->
<alias>
  <family>serif</family>
  <prefer>
    <family>Noto Serif CJK CN</family>
    <family>Noto Serif</family>
    <family>Noto Emoji</family>
    <family>DejaVu Serif</family>
    <family>IPAPMincho</family>
    <family>HanaMinA</family>
  </prefer>
</alias>
</fontconfig>
Of course this is just an example configuration.
You can also do something crazy and prioritise fonts for different languages:
/etc/fonts/local.conf
<fontconfig> 
 <match target="pattern">
  <test compare="contains" name="lang"><string>zh</string></test>
  <edit mode="prepend" name="family" binding="same"> 
   <string>Source Han Sans HK</string> 
  </edit>
  <edit mode="prepend" name="family" binding="same"> 
   <string>AR PL New Kai</string> 
  </edit>
  <edit mode="prepend" name="family" binding="same"> 
   <string>AR PL UKai HK</string> 
  </edit> 
 </match> 
 <match target="pattern"> 
  <test compare="contains" name="lang"><string>ja</string></test> 
  <edit mode="prepend" name="family" binding="same"> 
   <string>Source Han Sans JP</string> 
  </edit>
  <edit mode="prepend" name="family" binding="same"> 
   <string>HGSKyokashotai</string> 
  </edit> 
  <edit mode="prepend" name="family" binding="same"> 
   <string>GenjyuuGothic Normal</string> 
  </edit> 
 </match>
 <!-- your other configs (<alias>) here -->
</fontconfig>

windowsboy111 (talk) 09:40, 21 April 2024 (UTC)Reply[reply]