Ubuntu 9.04 Firefox安装Adobe Flash后乱码


Ubuntu 9.04下为浏览器Firefox安装Flash插件,找开谷歌音乐听歌,后来发现中文会变成方框。网上搜索一下,马上就找到解决方法。三人行必有我师焉,这句话真的得改了。改成“网络行必有我师焉。”

解决Ubuntu火狐Firefox安张adobe Flash插件后播放flash乱码问题

打开终端输入命令(为了安全,备份一下:sudo cp 49-sansserif.conf 49-sansserif.conf_backup )

sudo gedit /etc/fonts/conf.d/49-sansserif.conf

找到最后第4行的 sans-serif 替换为“文泉驿正黑”,即可解决。

代码:

<string>文泉驿正黑</string>

保存即可,重启firefox,flash乱码解决了。

修改后的内容为:

<?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>文泉驿正黑</string>
</edit>
</match>
</fontconfig>

相关内容