Installation of Chinese fonts under the Linux operating system

  

1. Disable the xfs server first.

Run the Setup command to abort the xfs runtime features in the service. The main reason for disabling the xfs server is that xfs will automatically update the fonts.dir file in the font directory, thus affecting the changes we made.

2. Copy the selected font to the relevant directory.

Generally, simsun.ttf is used as the basic font (it is said that the font is the most beautiful Chinese font). Copy these fonts to /usr/share/fonts/default/TrueType to generate the fonts.dir and fonts.scale files.

Run in the font directory where you are: 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

Also note that the first line of the file is changed accordingly, then copy fonts.dir to fonts.scale.

3, set the font path and load the server

edit /etc /X11 /XF86Config-4 file (# denotes a comment line).

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" < BR> EndSection
Section "Module"
......
Load "xtt"
......
EndSection

Restart and set the font to simsun in the Control Center. OK, you're done.


Copyright © Windows knowledge All Rights Reserved