Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to install Chinese fonts under Linux

Shulou Source: shulou.com Published: 2022-06-01 05:01:34 10月03日 Update

This article mainly shows you "how to install Chinese fonts under Linux", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn how to install Chinese fonts under Linux "this article.

1. Disable the xfs server first.

Run the Setup command to abort the feature that xfs runs with the system in the service item. The main reason for disabling the xfs server is that xfs automatically updates the fonts.dir file in the font directory, thus affecting our changes.

2. Copy the selected font to the relevant directory.

Simsun.ttf is generally chosen as the basic font (which is said to be the most exquisite Chinese font). Copy these fonts to / usr/share/fonts/default/TrueType to generate fonts.dir and fonts.scale files.

Run in the same font directory: ttmkfdir > fonts.dir. Edit the fonts.dir file and add two lines under simsun.ttf-misc-SimSun-medium-r-normal--0-0-0-0-p-0-ascii-0:

Simsun.ttf-misc-SimSun-medium-r-normal--0-0-0-0-p-0-gb2312.1980-0 simsun.ttf-misc-SimSun-medium-r-normal--0-0-0-0-p-0-gbk-0

At the same time, notice to change the number of the file * * line accordingly, and then copy fonts.dir to fonts.scale.

3. Set the font path and load the server.

Edit the / etc/X11/XF86Config-4 file (# for comment lines).

Section "Files" # FontPath "unix/:7100" FontPath "usr/X11R6/lib/X11/fonts/misc:unscaled" FontPath "/ usr/X11R6/lib/X11/fonts/75dpi:unscaled" FontPath "/ usr/X11R6/lib/X11/fonts/misc" FontPath "/ usr/X11R6/lib/X11/fonts/Type1" FontPath "/ usr/X11R6/lib/X11/fonts/ Speedo "FontPath" / usr/X11R6/lib/X11/fonts/75dpi "FontPath" / usr/share/fonts/default/TrueType "EndSection Section" Module "... Load "xtt". EndSection

Restart and set the font to simsun in the control center. OK, it's done.

The above is all the contents of the article "how to install Chinese fonts under Linux". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Font file Chinese font Chinese service content server directory article run copy learn help exquisite done the reason at the same time command great work Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi vpn macOS Microsoft MySQL