更新到 lubuntu 18.04 后显示 pdf 文件时出现问题

W. *_*eke 7 fonts lubuntu pdf evince

最近我将我的 lubuntu 版本从 16.04 更新到 18.04,从那时起我在显示某些符号 pdf 图(使用evince)时遇到了问题。我试图显示的 pdf 文件如下:

https://www.dropbox.com/s/mc2wp2y8q2af1vj/stupidPlot.pdf?dl=0

在我的屏幕上,它如下面的屏幕截图所示:

错误显示

而它应该如下所示:

正确显示

因此希腊符号 delta、gamma 和 capital delta 未按预期显示。经过一番搜索,我想这一定与我尝试阅读的 pdf 文件中没有嵌入字体有关(尽管我不确定,如果不是这种情况,请纠正我)。pdffonts给出以下输出:

name                                 type              encoding         emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
Times-Italic                         Type 1            WinAnsi          no  no  no       7  0
Times-Bold                           Type 1            WinAnsi          no  no  no       8  0
Times-BoldItalic                     Type 1            WinAnsi          no  no  no       9  0
Helvetica                            Type 1            WinAnsi          no  no  no      10  0
Helvetica-Oblique                    Type 1            WinAnsi          no  no  no      11  0
Helvetica-Bold                       Type 1            WinAnsi          no  no  no      12  0
Helvetica-BoldOblique                Type 1            WinAnsi          no  no  no      13  0
Courier                              Type 1            WinAnsi          no  no  no      14  0
Courier-Oblique                      Type 1            WinAnsi          no  no  no      15  0
Courier-Bold                         Type 1            WinAnsi          no  no  no      16  0
Courier-BoldOblique                  Type 1            WinAnsi          no  no  no      17  0
Symbol                               Type 1            Symbol           no  no  no      18  0
Times-Roman                          Type 1            WinAnsi          no  no  no      19  0
ZapfDingbats                         Type 1            ZapfDingbats     no  no  no      20  0
Symbol                               Type 1            Symbol           no  no  no      21  0
Run Code Online (Sandbox Code Playgroud)

我尝试使用以下给出的建议修复它:https : //stackoverflow.com/questions/10277418/the-pdf-viewer-evince-on-linux-can-not-display-some-math-symbols-correctly运行GhostScript 如下:

gs -o gs-repaired---stupidPlot.pdf -dPDFSETTINGS=/prepress -sDEVICE=pdfwrite quietPlot.pdf

这似乎不起作用并给出错误:

   **** Error: Encountered 'obj' while expecting 'endobj'.
               Treating this as a missing 'endobj', output may be incorrect.
   **** Error: Encountered 'obj' while expecting 'endobj'.
               Treating this as a missing 'endobj', output may be incorrect.
Processing pages 1 through 1.
Page 1
Loading NimbusSans-Regular font from /usr/share/ghostscript/9.26/Resource/Font/NimbusSans-Regular... 5086732 3571608 2679472 1286852 4 done.
Loading StandardSymbolsPS font from /usr/share/ghostscript/9.26/Resource/Font/StandardSymbolsPS... 5119500 3664456 2699672 1302649 4 done.

   **** This file had errors that were repaired or ignored.
   **** Please notify the author of the software that produced this
   **** file that it does not conform to Adobe's published PDF
   **** specification.
Run Code Online (Sandbox Code Playgroud)

**** 此文件的渲染输出可能不正确。

此外,我必须生成许多(数万个)pdf 图,因此最好不要在其中嵌入字体以正确显示它们。

所以我想知道是否有人知道从 lubuntu 16.04 更新到 18.04 时可能会发生什么变化(在 16.04 中,绘图总是正确显示),以及我如何正确显示 pdf 文件evince,最好不必在 pdf 中嵌入字体。

我也尝试使用xpdfokular作为 的替代品evince,但它们以相同的方式错误地显示了符号。

小智 1

在 Adob​​e Illustrator 中打开文件,您会发现字形字体实际上是https://en.wikipedia.org/wiki/Symbol_(typeface)它可能随 Adob​​e Reader 等一起提供,但没有证据。同时,您可能没有将字体安装为系统字体,因此没有什么可回退的。鼓励不要默默地用其他字体替换它。

可以正确显示的最后一件事是字体是否在创建时嵌入文件(pdf 本身中的完整信息)。然而,基于https://root-forum.cern.ch/t/embed-fonts-in-pdf/21666/2 ROOT不允许嵌入字体以保持文件大小较小。

tl;dr 确保字体设置为“Helvetica”,除非在 mac 上,否则会给您 Arial,但无论哪种方式,您都应该能够正确显示符号。