PDF不显示汉字或者显示方框解决方法

转自:http://hi.baidu.com/huleyin/blog/item/18fdd6dc9ea16c1c62279856.html

1.安装poppler-data

apt-get install poppler-data

2.编辑/etc/fonts/conf.d/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> -->
<string>宋体</string>
</edit>
</match>
</fontconfig>


修改红色部分为想用的字体


OK!


你可能感兴趣的:(c,System)