Font substitutions for pdf-files

My energy company sends me pdf-bills without embedded fonts.

    $ pdffonts bill_p52-e-201907_KirOE.pdf 
    name                                 type              encoding         emb sub uni object ID
    ------------------------------------ ----------------- ---------------- --- --- --- ---------
    Arial                                CID TrueType      Identity-H       no  no  yes      4  0
    Arial,Bold                           CID TrueType      Identity-H       no  no  yes      5  0

I think the Arial font must be substitute to Liberation Sans

    $ fc-match Arial
    LiberationSans-Regular.ttf: "Liberation Sans" "Regular"

But both Atril and qpdfview show garbage.

I put Arial.ttf to ~/.local/share/fonts and all OK.

Q. Why font substitutions don’t work for pdf-files?

@sparcher, I don’t know an answer to your question about font substitution, I haven’t seen any Linux pdf viewer doing it and displaying such files properly.

I’ve found two ways to see pdf’s without built-in windows fonts:

  1. Easier/better one. Open them in a browser. Both Firefox and Google chrome show them fully readable. From my experience when printing such a pdf from a browser you need to enable “Print as an image” option or you’ll see the same garbled text on a printed page.

  2. More clumsy / legacy one. Previously I’ve used to install windows PDF viewer and open it through Wine.

1 Like