Linux下文泉驿字体配置方法
这两天研究了一下文泉驿字体的配置方法,算是比较清楚了,方法很简单:1.
sudo apt-get install xfonts-wqy
(安装文泉驿字体)
2.
cd /etc/fonts/conf.d
sudo rm -rf 30*.*
(删除那个以“30”开头的文件,具体的名称忘记了,用通配符就可一了,因为如果不删除这个文件,Debian默认是不会是用点阵字体的)
3.
fc-cache -v -f
(刷新字体缓冲)
4. 修改
/etc/fonts/fonts.conf
文件。这一步并不是必须的步骤,不过可以通过修改这里的配置,以达到最优话配置。以下是我的配置,可以直接复制过去替换您原来的文件,不过千万不要忘了备份一下,以防万一!
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- /etc/fonts/fonts.conf file to configure system font access -->
<fontconfig>
<!--
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
-->
<!-- Font directory list -->
<dir>/usr/share/fonts</dir>
<dir>/usr/share/X11/fonts</dir> <dir>/usr/local/share/fonts</dir>
<dir>~/.fonts</dir>
<!--
Accept deprecated 'mono' alias, replacing it with 'monospace'
-->
<match target="pattern">
<test qual="any" name="family">
<string>mono</string>
</test>
<edit name="family" mode="assign">
<string>monospace</string>
</edit>
</match>
<!--
Accept alternate 'sans serif' spelling, replacing it with 'sans-serif'
-->
<match target="pattern">
<test qual="any" name="family">
<string>sans serif</string>
</test>
<edit name="family" mode="assign">
<string>sans-serif</string>
</edit>
</match>
<!--
Accept deprecated 'sans' alias, replacing it with 'sans-serif'
-->
<match target="pattern">
<test qual="any" name="family">
<string>sans</string>
</test>
<edit name="family" mode="assign">
<string>sans-serif</string>
</edit>
</match>
<!--
Mark common families with their generics so we'll get
something reasonable
-->
<!--
Serif faces
-->
<alias>
<family>DejaVu Serif</family>
<family>Bitstream Vera Serif</family>
<family>WenQuanYi Bitmap Song</family>
<family>Times New Roman</family>
<family>Thorndale AMT</family>
<family>Times</family>
<family>Nimbus Roman No9 L</family>
<family>Luxi Serif</family>
<family>Kochi Mincho</family>
<family>AR PL SungtiL GB</family>
<family>AR PL Mingti2L Big5</family>
<family>MS 明朝</family>
<family>Baekmuk Batang</family>
<family>FreeSerif</family>
<family>MgOpen Canonica</family>
<default><family>serif</family></default>
</alias>
<!--
Sans-serif faces
-->
<alias>
<family>DejaVu Sans</family>
<family>Bitstream Vera Sans</family>
<family>WenQuanYi Bitmap Song</family>
<family>Helvetica</family>
<family>Arial</family>
<family>Verdana</family>
<family>Albany AMT</family>
<family>Nimbus Sans L</family>
<family>Luxi Sans</family>
<family>Kochi Gothic</family>
<family>AR PL KaitiM GB</family>
<family>AR PL KaitiM Big5</family>
<family>MS ゴシック</family>
<family>Baekmuk Dotum</family>
<family>SimSun</family>
<family>FreeSans</family>
<family>MgOpen Moderna</family>
<default><family>sans-serif</family></default>
</alias>
<!--
Monospace faces
-->
<alias>
<family>DejaVu Sans Mono</family>
<family>Bitstream Vera Sans Mono</family>
<family>WenQuanYi Bitmap Song</family>
<family>Courier</family>
<family>Courier New</family>
<family>Andale Mono</family>
<family>Luxi Mono</family>
<family>Cumberland AMT</family>
<family>Nimbus Mono L</family>
<family>NSimSun</family>
<family>FreeMono</family>
<default><family>monospace</family></default>
</alias>
<!--
If the font still has no generic name, add sans-serif
-->
<match target="pattern">
<test qual="all" name="family" compare="not_eq">
<string>sans-serif</string>
</test>
<test qual="all" name="family" compare="not_eq">
<string>serif</string>
</test>
<test qual="all" name="family" compare="not_eq">
<string>monospace</string>
</test>
<edit name="family" mode="append_last">
<string>sans-serif</string>
</edit>
</match>
<!--
Prefer "Standard Symbols L" as Symbol font
-->
<match targ