打开终端,执行:
cd /etc/fonts/conf.d/

为了安全,备份一下字体配置文件:
sudo cp 49-sansserif.conf 49-sansserif.conf_backup

以root身份打开:
sudo gedit ./49-sansserif.conf

此时文件显示的内容如下:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!--
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>
</fontconfig>

如上所示,将其中的第1、2、4个<string>后面的sans-serif或者serif用你自己系统中支持中文的字体的名字代替,注意字体名字的大小写
比如:我的系统中安装了wqy-zenhei.ttf,我则用wqy-zenhei代替上述所说的字段:
我的系统修改后的文件如下所示(注意:个人根据自己的实际情况修改)

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!--
If the font still has no generic name, add sans-serif
-->
<match target="pattern">
<test qual="all" name="family" compare="not_eq">
<string>wqy-zenhei</string>
</test>
<test qual="all" name="family" compare="not_eq">
<string>wqy-zenhei</string>
</test>
<test qual="all" name="family" compare="not_eq">
<string>monospace</string>
</test>
<edit name="family" mode="append_last">
<string>wqy-zenhei</string>
</edit>
</match>
</fontconfig>
From: 本站原创
评论(0) 引用(0) 阅读(1372)
已经有0个回复
您也可用OpenID登入:
看完了要说点啥?

昵称(必填)

电邮(必填)

网址(请包含http://)

打开UBB 表情 打开表情 隐藏 记住我 [注册]
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot