Non-embedded monospaced font replaced with normal font
German bank "Volksbank" generate PDFs that use fonts "RFont0" (up to "RFont8"), but which are not embedded in the PDF. Some of those fonts are fixed-width (monospace) fonts and have the correct bit 1 set in their flags ("/Flags 33"), which indicates that the font is monospaced.
Unfortunately they get replaced with normal dynamic-width fonts, which makes the text very hard to read - the letters have different widths, but are spaced with fixed widths.
Test file: infobogen-1.pdf
This happens on Ubuntu 20.04 with Evince 3.36.10 and:
- libpoppler-glib8/focal,now 0.86.1-0ubuntu1
- libpoppler-qt5-1/focal,now 0.86.1-0ubuntu1
- libpoppler97/focal,now 0.86.1-0ubuntu1
- poppler-data/focal,focal,now 0.4.9-2
- poppler-utils/focal,now 0.86.1-0ubuntu1
pdffonts
shows that all fonts are replaced with normal fonts:
$ pdffonts -subst infobogen-1.pdf
name object ID substitute font substitute font file
--------------- --------- ------------------ ------------------------------------
RFont0 9 0 DejaVu Sans /usr/share/fonts/truetype/dejavu/DejaVuSans.ttf
RFont1 10 0 DejaVu Sans /usr/share/fonts/truetype/dejavu/DejaVuSans.ttf
RFont2,Bold 11 0 DejaVu Sans Bold /usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf
RFont3 12 0 DejaVu Sans /usr/share/fonts/truetype/dejavu/DejaVuSans.ttf
RFont4 13 0 DejaVu Sans /usr/share/fonts/truetype/dejavu/DejaVuSans.ttf
RFont5 14 0 DejaVu Sans /usr/share/fonts/truetype/dejavu/DejaVuSans.ttf
The font system replaces RFont3
with DejaVu Sans:
$ fc-match RFont3
DejaVuSans.ttf: "DejaVu Sans" "Book"
My guess is that poppler asks the font system for the font name, gets a reply and simply uses this - without checking if the name matches exactly, and without checking if the font is monospaced.
This is similar to #387, but in that issue the PDF's font information missed the FixedPitch
bit.
The file renders correctly in mupdf
.
That issue is well-known in German Linux user circles: