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!


转载于:https://my.oschina.net/dake/blog/196797

猜你喜欢

转载自blog.csdn.net/weixin_33850015/article/details/91586379