Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • P poppler
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 656
    • Issues 656
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 42
    • Merge requests 42
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • poppler
  • poppler
  • Issues
  • #843

Closed
Open
Created Nov 20, 2019 by Fabian Greffrath@fabiangreffrath

evince and pdftocairo not following poppler's nor fontconfig's font substitution rules

Hello,

I have initially filed this issue against Evince ([1] which is now confidental), but in the course of the discussion it turned out the bug is somewhere in poppler itself instead, since even its own pdftocairo renders the document with the same artifacts that I have seen in evince.

I have received a PDF document which is written (mostly) in Arial. No problem, I don't have Arial installed, but I have a substitution font "Arimo" available and both fontconfig and poppler are reporting they are going to use this instead of Arial:

$ fc-match Arial
Arimo-Regular.ttf: "Arimo" "Regular"

 pdffonts test.pdf 
name                                 type              encoding         emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
Arial                                TrueType          WinAnsi          no  no  no       9  0
Arial,Bold                           TrueType          WinAnsi          no  no  no      10  0
Arial                                TrueType          WinAnsi          no  no  no      11  0
Arial,Bold                           TrueType          WinAnsi          no  no  no      12  0
Arial                                TrueType          WinAnsi          no  no  no      14  0
Arial                                TrueType          WinAnsi          no  no  no      15  0
Arial,Bold                           TrueType          WinAnsi          no  no  no      16  0
Arial,Bold                           TrueType          WinAnsi          no  no  no      20  0
3of9Barcode                          CID TrueType      Identity-H       no  no  yes     21  0
CourierNew                           TrueType          WinAnsi          no  no  no      22  0
Arial                                CID TrueType      Identity-H       no  no  yes     23  0

$ pdffonts -subst test.pdf 
name                                 object ID substitute font                      substitute font file
------------------------------------ --------- ------------------------------------ ------------------------------------
Arial                                     9  0 Arimo                                /usr/share/fonts/truetype/croscore/Arimo-Regular.ttf
Arial,Bold                               10  0 Arimo Bold                           /usr/share/fonts/truetype/croscore/Arimo-Bold.ttf
Arial                                    11  0 Arimo                                /usr/share/fonts/truetype/croscore/Arimo-Regular.ttf
Arial,Bold                               12  0 Arimo Bold                           /usr/share/fonts/truetype/croscore/Arimo-Bold.ttf
Arial                                    14  0 Arimo                                /usr/share/fonts/truetype/croscore/Arimo-Regular.ttf
Arial                                    15  0 Arimo                                /usr/share/fonts/truetype/croscore/Arimo-Regular.ttf
Arial,Bold                               16  0 Arimo Bold                           /usr/share/fonts/truetype/croscore/Arimo-Bold.ttf
Arial,Bold                               20  0 Arimo Bold                           /usr/share/fonts/truetype/croscore/Arimo-Bold.ttf
3of9Barcode                              21  0 DejaVu Sans                          /usr/share/fonts/truetype/dejavu/DejaVuSans.ttf
CourierNew                               22  0 Cousine                              /usr/share/fonts/truetype/croscore/Cousine-Regular.ttf
Arial                                    23  0 Arimo                                /usr/share/fonts/truetype/croscore/Arimo-Regular.ttf

Evince, however, does not use Arimo as a substitute for Arial, but NimbusSans-Regular instead which is part of the 35 Ghostscript Core fonts by URW++. This font, however, does not feature the same glyphs as Arial/Arimo, which leads to certain parts of the document being misrendered, e.g. the missing EUR currency glyph in the "Betrag in Höhe von ..." field.

Bildschirmfoto_vom_2019-09-21_22-30-38

Bildschirmfoto_vom_2019-09-21_22-33-02

The versions of all the involved packages are as follows:

$ dpkg -l {evince,libpoppler*,libharfbuzz*,libfontconfig*} | awk '/^ii/{print $2 " " $3}'
evince 3.32.0-2
libfontconfig1:amd64 2.13.1-2+b1
libharfbuzz-icu0:amd64 2.6.1-3
libharfbuzz0b:amd64 2.6.1-3
libpoppler-cpp0v5:amd64 0.71.0-5+b1
libpoppler-glib8:amd64 0.71.0-5+b1
libpoppler82:amd64 0.71.0-5+b1

In the original evince bug report, Jason Crane stated the following: " Jason Crain Jason Crain @jcrain · 1 month ago Developer

I think I see what poppler is doing. It defines Arial as being an alias for Helvetica, so it searches for Helvetica instead.

I'm going to guess that your PDF is "broken", at least I would probably consider it broken, since it has probably embedded Arial glyph IDs and is using those to look up glyphs. I'm not sure if even Arimo has that level of compatibility with Arial, so possibly the only way it would render correctly is if it uses the real Arial font. "

I am attaching the document here. After all, it's just a repair invoice for my coffee machine. This is the non-confidental pendant to #838 (closed).

  • Fabian

https://gitlab.gnome.org/GNOME/evince/issues/1257

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking