The default font used for X11 is not ideal. Large fonts appear uneven. When you open your browser and read Chinese characters, you can vomit blood.
Therefore, we need to manually add the font in either of the following ways:
1. Add Type1 fonts such as Times Roman, Helvetica, and Palatino.
The URW font set (x11-fonts/urwfonts) includes a high quality standard type1 font. Therefore, install URW:
1.1 install URW
# Cd/usr/ports/x11-fonts/urwfonts
# Make install clean
1.2 configure URW
Add the following configuration in the configuration file (/etc/X11/xorg. conf) of the X server:
FontPath "/usr/local/lib/X11/fonts/URW /"
You can also run the command in the current session. The following content must be executed on the Terminal of X Desktop.
% Xset fp +/usr/local/lib/X11/fonts/URW
% Xset fp rehash
2. Install TrueType in Chinese fonts such as and .®Font
Xorg has built-in TrueType®Font support
2.1 configuration file
Add the following line to the "Module" section of the/etc/X11/xorg. conf file.
Load "freetype"
2.2 is TrueType®Font to create a directory
For example,/usr/local/lib/X11/fonts/TrueType®Copy the font to this directory. Remember, you cannot directly access the Mac®Extract TrueType from computer®The font; which can be used by X11 must be UNIX®MS-DOS®/Windows®Format.
2.3 use ttmkfdir to create the fonts. dir file so that the X Font engine knows that you have installed these new files.
2.3.1 ttmkfdir must be installed. You can directly use pkg_add-r ttmkfdir to install ttmkfdir.
2.3.2
# Cd/usr/local/lib/X11/fonts/TrueType
# Ttmkfdir-o fonts. dir
3.4 set TrueType®Add the font directory to the font path
Add the following configuration in the configuration file (/etc/X11/xorg. conf) of the X server:
FontPath "/usr/local/lib/X11/fonts/TrueType"
If you want to enable it immediately, enter the following command: (the command must be executed in Terminal of X Desktop)
% Xset fp +/usr/local/lib/X11/fonts/TrueType
% Xset fp rehash
That's it. Now Netscape®, Gimp, StarOffice™And all other X applications should be able to recognize installed TrueType®Font. Some small fonts (such as text displayed in high resolution on Web pages) and some large fonts (in StarOffice™Now it looks good.
3. Install the Chinese font of wenquanyi:
# Whereis wqy
Wqy:/usr/ports/x11-fonts/wqy.
# Cd/usr/port/x11-fonts/wqy
# Make install clean
15 minutes or so OK
Load the font when the X system starts.
Edit/etc/X11/xorg. conf
Add a line in Section "Files", FontPath "/usr/local/lib/X11/fonts/wqy", as shown below:
Section "Files"
ModulePath "/usr/local/lib/xorg/modules"
FontPath "/usr/local/lib/X11/fonts/misc /"
FontPath "/usr/local/lib/X11/fonts/TTF /"
FontPath "/usr/local/lib/X11/fonts/OTF"
FontPath "/usr/local/lib/X11/fonts/Type1 /"
FontPath "/usr/local/lib/X11/fonts/100 dpi /"
FontPath "/usr/local/lib/X11/fonts/75 dpi /"
FontPath "/usr/local/lib/X11/fonts/wqy"
EndSection