Preferring Chinese fonts to Japanese ones in Ubuntu 18.04

  1. Copy the system configuration file /etc/fonts/conf.avail/64-language-selector-prefer.conf to the per-user font configuration folder.
    $ mkdir ~/.config/fontconfig/
    $ cp /etc/fonts/conf.avail/64-language-selector-prefer.conf ~/.config/fontconfig/fonts.conf
    

  2. Move SC and TC fonts in front of JP and KR ones in the aliases defined in ~/.config/fontconfig/fonts.conf:
    <?xml version="1.0"?>
    <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
    <fontconfig>
        <alias>
            <family>sans-serif</family>
            <prefer>
                <family>Noto Sans CJK SC</family>
                <family>Noto Sans CJK TC</family>
                <family>Noto Sans CJK JP</family>
                <family>Noto Sans CJK KR</family>
            </prefer>
        </alias>
        <alias>
            <family>serif</family>
            <prefer>
                <family>Noto Serif CJK SC</family>
                <family>Noto Serif CJK TC</family>
                <family>Noto Serif CJK JP</family>
                <family>Noto Serif CJK KR</family>
            </prefer>
        </alias>
        <alias>
            <family>monospace</family>
            <prefer>
                <family>Noto Sans Mono CJK SC</family>
                <family>Noto Sans Mono CJK TC</family>
                <family>Noto Sans Mono CJK JP</family>
                <family>Noto Sans Mono CJK KR</family>
            </prefer>
        </alias>
    </fontconfig>
    
  3. Restart apps.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.