There are too many of these articles on the web, and write down your own methods for future reference.
The first thing to do is to dig out the TrueType fonts that are used in Windows, as shown in the following list:
Courbd.ttf Courbi.ttf Couri.ttf Cour.ttf Simsun.ttf <--Song, originally SIMSUN.TTC, please modify the extension to TTF Tahomabd.ttf Tahoma.ttf Verdanab.ttf Verdanai.ttf Verdana.ttf
|
Put the above files here:
[Root@redhat/tmp] # cd/usr/share/fonts [Root@redhat/usr/share/fonts] # mkdir Local [Root@redhat/usr/share/fonts] # CD Local [Root@redhat/usr/share/fonts/local] # Cp/tmp/*.ttf./
|
To refresh the font cache:
[Root@redhat/usr/share/fonts/local] # FC-CACHE-FV Fc-cache: "/usr/share/fonts": caching, 0 fonts, 6 dirs Fc-cache: "/usr/share/fonts/bitmap-fonts": Caching, fonts, 0 dirs Fc-cache: "/USR/SHARE/FONTS/ZH_TW": caching, 0 fonts, 1 dirs Fc-cache: "/usr/share/fonts/zh_tw/truetype": Caching, 2 fonts, 0 dirs Fc-cache: "/usr/share/fonts/local": Caching, fonts, 0 dirs Fc-cache: "/usr/share/fonts/default": caching, 0 fonts, 2 dirs Fc-cache: "/usr/share/fonts/default/ghostscript": caching, 8 fonts, 0 dirs Fc-cache: "/usr/share/fonts/default/type1": Caching, fonts, 0 dirs Fc-cache: "/USR/SHARE/FONTS/ZH_CN": caching, 0 fonts, 1 dirs Fc-cache: "/usr/share/fonts/zh_cn/truetype": Caching, 3 fonts, 0 dirs Fc-cache: "/usr/share/fonts/bitstream-vera": Caching, fonts, 0 dirs Fc-cache: "/usr/x11r6/lib/x11/fonts/type1": Caching, fonts, 0 dirs Fc-cache: "/USR/X11R6/LIB/X11/FONTS/OTF": caching, 0 fonts, 0 dirs Fc-cache: "/root/.fonts": skipping, no such directory fc-cache:succeeded
|
Generate Fonts.dir and Fonts.scale files:
[Root@redhat/usr/share/fonts/local] # ttmkfdir-d./o Fonts.dir [Root@redhat/usr/share/fonts/local] # VI Fonts.dir
|
Remember to make a copy of Fonts.dir and rename it to Fonts.scale.
Next we need to modify the/etc/fonts/local.conf to adjust the order of precedence in both English and Chinese:
[Root@redhat/etc/fonts] # VI local.conf
|
The contents are as follows:
<fontconfig>
<!--// =============================== Linux Dist:ubuntu 7.04 Feisty =============================== Fontconfig:2.4.2-1ubuntu1 freetype:2.2.1-5ubuntu1.1 Libxft:2.1.12-1 Xorg:7.2-0ubuntu11 ============================== File: ~/.fonts.conf version:20070606 final -->
<!--//reordering fonts in a font cluster//--> <alias> <family>serif</family> <prefer> <family>bitstream Vera serif</family> <family>dejavu serif</family> <family>SimSun</family> <family>MingLiu</family> <family>wenquanyi Bitmap song</family> </prefer> </alias> <alias> <family>sans-serif</family> <prefer> <family>Tahoma</family> <family>bitstream Vera sans</family> <family>dejavu sans</family> <family>SimSun</family> <family>MingLiu</family> <family>wenquanyi Bitmap song</family> </prefer> </alias> <alias> <family>monospace</family> <prefer> <family>bitstream Vera Sans mono</family> <family>dejavu Sans mono</family> <family>SimSun</family> <family>MingLiu</family> <family>wenquanyi Bitmap song</family> </prefer> </alias>
<!--//font alias setting -01//--> <!--//The set test was found to not work, but it remained as part of the 01 section. --> <alias> <family>SimSun</family> <accept><family> Song Body </family></accept> </alias> <alias> <family>NSimSun</family> <accept><family> New song Body </family></accept> </alias> <alias> <family>SimHei</family> <accept><family> Bold </family></accept> </alias> <alias> <family>microsoft yahei</family> <accept><family> Microsoft Ya-Black </family></accept> </alias> <alias> <family>FangSong_GB2312</family> <accept> <family> Imitation </family> <family> Imitation _gb2312</family> </accept> </alias> <alias> <family>KaiTi_GB2312</family> <accept> <family> italics </family> <family> italics _gb2312</family> </accept> </alias> <alias> <family>YouYuan</family> <accept><family> Young Circle </family></accept> </alias> <alias> <family>MingLiU</family> <accept><family> Clear </family></accept> </alias> <alias> <family>PMingLiU</family> <accept><family> New Detailed </
|