这次在linux下复制文件时,突发来了兴致决定去谷歌听听歌曲。没想到中文字成了方块。唉,以前也碰到过。知道也是字体没有设置的问题。没问题。继续搞定。
大部分是看的别人的,最后XML文件是自己的。呵呵。引用:http://spiritfrog.blog.ubuntu.org.cn/2008/05/18/ubuntu-flash%E4%B8%AD%E6%96%87%E4%B9%B1%E7%A0%81/
输入:
cd /etc/fonts/conf.d/
为了安全,备份一下:
sudo cp 49-sansserif.conf 49-sansserif.conf_backup
输入如下指令:
sudo gedit ./49-sansserif.conf
此时文件显示内容。
将其中的第1、2、4个后面的sans-serif或者serif用你自己系统中支持中文的字体的名字代替,注意字体名字的大小写
比如:我的系统中安装了雅黑,我喜欢雅黑,我则用雅黑i代替上述所说的字段,结果如下:
<?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>微软雅黑</string>
</test>
<test qual="all" name="family" compare="not_eq">
<string>微软雅黑</string>
</test>
<test qual="all" name="family" compare="not_eq">
<string>微软雅黑</string>
</test>
<edit name="family" mode="append_last">
<string>微软雅黑</string>
</edit>
</match>
</fontconfig>
<!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>微软雅黑</string>
</test>
<test qual="all" name="family" compare="not_eq">
<string>微软雅黑</string>
</test>
<test qual="all" name="family" compare="not_eq">
<string>微软雅黑</string>
</test>
<edit name="family" mode="append_last">
<string>微软雅黑</string>
</edit>
</match>
</fontconfig>