ubuntu pdf中文乱码问题解决

具体步骤:
一、安装一个东西,似乎是字体哦?
sudo apt-get install poppler-data

二、修改字体配置文件
sudo gedit /etc/fonts/conf.d/69-language-selector-zh-cn.conf

我只修改了红色字体部分,就是WenQuanYi Zen Hei 这款中文字体移动到第一个位置。

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>

<match target="pattern">
<test qual="any" name="family">
<string>serif</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>DejaVu Serif</string>
<string>Bitstream Vera Serif</string>
<string>HYSong</string>
<string>AR PL UMing CN</string>
<string>AR PL UMing HK</string>
<string>AR PL ShanHeiSun Uni</string>
<string>AR PL New Sung</string>
<string>WenQuanYi Bitmap Song</string>
<string>AR PL UKai CN</string>
<string>AR PL ZenKai Uni</string>
</edit>
</match> 
<match target="pattern">
<test qual="any" name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>WenQuanYi Zen Hei</string>
<string>DejaVu Sans</string>
<string>Bitstream Vera Sans</string>
<string>WenQuanYi Micro Hei</string>
<string>Droid Sans Fallback</string>
<string>HYSong</string>
<string>AR PL UMing CN</string>
<string>AR PL UMing HK</string>
<string>AR PL ShanHeiSun Uni</string>
<string>AR PL New Sung</string>
<string>AR PL UKai CN</string>
<string>AR PL ZenKai Uni</string>
</edit>
</match> 
<match target="pattern">
<test qual="any" name="family">
<string>monospace</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>DejaVu Sans Mono</string>
<string>Bitstream Vera Sans Mono</string>
<string>WenQuanYi Micro Hei Mono</string>
<string>WenQuanYi Zen Hei Mono</string>
<string>Droid Sans Fallback</string>
<string>HYSong</string>
<string>AR PL UMing CN</string>
<string>AR PL UMing HK</string>
<string>AR PL ShanHeiSun Uni</string>
<string>AR PL New Sung</string>
<string>AR PL UKai CN</string>
<string>AR PL ZenKai Uni</string>
</edit>
</match> 

</fontconfig>

猜你喜欢

转载自dylanwu.iteye.com/blog/1143901