linux下打开pdf文件汉字变为方格解决。

来源:互联网 发布:东芝财务造假数据分析 编辑:程序博客网 时间:2024/06/07 03:27

转自: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 为
[html] view plaincopy
  1. <?xml version="1.0"?>  
  2. <!DOCTYPE fontconfig SYSTEM "fonts.dtd">  
  3. <fontconfig>  
  4. <!-- 
  5. If the font still has no generic name, add sans-serif 
  6. -->  
  7. <match target="pattern">  
  8. <test qual="all" name="family" compare="not_eq">  
  9. <string>sans-serif</string>  
  10. </test>  
  11. <test qual="all" name="family" compare="not_eq">  
  12. <string>serif</string>  
  13. </test>  
  14. <test qual="all" name="family" compare="not_eq">  
  15. <string>monospace</string>  
  16. </test>  
  17. <edit name="family" mode="append_last">  
  18. <!--    <string>sans-serif</string> -->  
  19. <string>宋体</string>  
  20. </edit>  
  21. </match>  
  22. </fontconfig>  


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


OK!

0 0
原创粉丝点击