Holmesian Blog

解决Ubuntu的Pdf乱码问题

先安装poppler-data

    sudo apt-get install poppler-data

编辑 /etc/fonts/conf.d/49-sansserif.conf,将倒数第四行的字体改为汉字的字体,如下我改成了monospace

    
    <?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>monospace</string>
            </edit>
        </match>
    </fontconfig>

当前页面是本站的「Google AMP」版。查看和发表评论请点击:完整版 »