About the case that it became a Chinese font after updating with Linux (correction method)

Yota story

In the streets, the phenomenon in which the Chinese characters (simplified characters) used in mainland China are displayed is called the "Chinese font phenomenon." For Chinese users who use the most simplified Chinese characters, the name of this phenomenon is "Nan no Kocha", but it took time to recognize this display phenomenon as a group of words. And probably only Japanese users will recognize this phenomenon as a "problem".

The other day, when I tried to update the OS after a long time and restarted with sudo dnf update (I use Fedora, which is synonymous with sudo apt-get update in Ubuntu), the Chinese font phenomenon appeared from the login screen. It had occurred. Of course, even though the OS setting language is "Japanese"!

I think that this will not spend a lot of time on troublesome things, but I will immediately investigate the improvement measures.

solution

--Settings under / etc / fonts (ʻetcis the directory where the OS configuration files are stored): --When you execute the commandls / etc / fonts /, you will find the conf.d directory and the fonts.confconfiguration file. Once I openedfonts.conf`, I found a comment from X Window developer Keith Packard.

<!--
        DO NOT EDIT THIS FILE.
        IT WILL BE REPLACED WHEN FONTCONFIG IS UPDATED.
        LOCAL CHANGES BELONG IN 'local.conf'.

        The intent of this standard configuration file is to be adequate for
        most environments.  If you have a reasonably normal environment and
        have found problems with this configuration, they are probably
        things that others will also want fixed.  Please submit any
        problems to the fontconfig bugzilla system located at fontconfig.org

        Note that the normal 'make install' procedure for fontconfig is to
        replace any existing fonts.conf file with the new version.  Place
        any local customizations in local.conf which this file references.

        Keith Packard
-->

In other words, you can see that you cannot write directly here. Instead, write the settings to local.conf. However, I couldn't find local.conf in ls, so I created it under / etc / fonts /.

# vi /etc/fonts/local.conf

The font families "serif", "sans-serif", and "monospace" are described as follows so that the Noto * font family can be read. Refer to fontconfig user document for the description method.

local.conf


<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
    <alias>
        <family>serif</family>
        <prefer>
            <family>Noto Serif</family>
        </prefer>
    </alias>
    <alias>
        <family>sans-serif</family>
        <prefer>
            <family>Noto Sans</family>
            <family>Noto Sans CJK JP</family>
        </prefer>
    </alias>
    <alias>
        <family>monospace</family>
        <prefer>
            <family>Noto Sans Mono CJK JP</family>
        </prefer>
    </alias>
</fontconfig>

When I restarted with this, I was able to get out of the Chinese font phenomenon safely.

Recommended Posts

About the case that it became a Chinese font after updating with Linux (correction method)
The case that the installation of pip became easier before I knew it
A note about the functions of the Linux standard library that handles time
About the matter that localhost: 4040 cannot be accessed after running Spark with Docker
A model that identifies the guitar with fast.ai
It is a piggybacking story about the service that returns "Nyan" when you ping
It seems that a new lottery with a total score will start in the sports lottery,
Collect tweets about "Corona" with python and automatically detect words that became a hot topic due to the influence of "Corona"