网上虽然有不少关于Ubuntu下宋体显示的问题,但是经本人在Ubuntu 11.04 Natty下测试,效果都非常差。这里提供一个简单的方法,只修改宋体的渲染,不需要修改/etc/fonts/local.conf
1. 建立目录/usr/share/fonts/winfonts,从XP中将常用字体到此目录下
2. 运行sudo fc-cache -fv,字体立即生效
3. 在/etc/fonts/conf.d下建立宋体配置文件:67-simsun-sharp.conf
内容为:
<?xml version=”1.0″?>
<!DOCTYPE fontconfig SYSTEM “fonts.dtd”>
<!– SimSun Configure File –>
<fontconfig>
<match target=”font”>
<test qual=”any” name=”family”>
<string>SimSun</string>
<string>宋体</string>
<string>NSimSun</string>
<string>新宋体</string>
</test>
<test name=”weight” compare=”less_eq” target=”pattern”>
<const>medium</const>
</test>
<test compare=”less_eq” name=”pixelsize”><double>17</double></test>
<test compare=”more_eq” name=”pixelsize”><double>12</double></test>
<edit name=”antialias” mode=”assign”><bool>false</bool></edit>
<edit name=”embeddedbitmap” mode=”assign”><bool>true</bool></edit>
<edit name=”hinting” mode=”assign”><bool>true</bool></edit>
<edit name=”hintstyle” mode=”assign”><const>hintfull</const></edit>
<edit name=”autohint” mode=”assign” ><bool>false</bool>
</edit>
</match>
</fontconfig>
Alt+PrtSc+K重启X-Windows生效.