Bug 12839 - evince doesn't display the correct font
Summary: evince doesn't display the correct font
Status: RESOLVED MOVED
Alias: None
Product: poppler
Classification: Unclassified
Component: cairo backend (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-17 13:38 UTC by Sebastien Bacher
Modified: 2018-08-20 22:08 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Sebastien Bacher 2007-10-17 13:38:39 UTC
The bug has been opened on https://bugs.launchpad.net/bugs/132417

"...
When displaying a PDF document with a non-embedded font 'ArialMT', no attempt is made to display the ArialMT font.

Expected behavior:
evince asking fontconfig to produce the closest match to the ArialMT font.

Actual behavior:
no request for font is seen in debug output of fontconfig.

It might be a poppler issue, poppler seems to convert ArialMT into Helvetica wich receives a less fitting match from fontconfig when Arial is present.
...


After trying to find an excellent example, i'll have to amend my bugreport a tiny bit. It is not about ArialMT but about non-embedded: PalatinoLinotype-Roman

It's about document http://www.vmware.com/pdf/vi3_301_201_admin_guide.pdf

The 'normal' text on for instance book page 7, is in acrobat reader a serif typeface, in evince it is a 'sans-serif'.

When i turn on FC_DEBUG=4 and 'printCommands yes' i learn the following:

Add Subst match
        pattern any family Equal "Palatino-Roman"
edit
        Edit family Append "URWPalladioL-Roma";

(indeed: fc-match Palatino-Roman gives: URWPalladioL-Roma.pfb: "URW Palladio L" "Roman", which is in gfonts-x11)

I am not a master in interpreting fontconfig / poppler debug output, but i will try to find the relevant spot:

If poppler encounters the lines:

Tf /TT8 1
  font: tag=TT8 name='PalatinoLinotype-Roman' 1
Tm 10.98 0 0 10.98 153 640.02
Tc 0.0008
Tw -0.0049
Tj (Customizing Guest Op)

It starts finding a proper font match.

FcConfigSubstitute Pattern has 6 elts (size 16)
        family: "Palatino Linotype"(s)
        slant: 0(i)(s)
        weight: 80(i)(s)
        width: 100(i)(s)
        spacing: 0(i)(s)
        lang: "xx"(s)
...
(it passes the opportunity to match a close relative:)
FcConfigSubstitute test pattern any family Equal "Palatino-Roman"
No match
...
(and concludes with:)
Substitute match
        pattern all family NotEqual "sans-serif"
        pattern all family NotEqual "serif"
        pattern all family NotEqual "monospace"
edit
        Edit family AppendLast "sans-serif";

Does this help you any further?

Gr. Sim
...
By the way, i've recompiled libpoppler-glib and removed the internal font face translation (effectively delegating it to fontconfig). And the PDF's look almost perfect."
Comment 1 Albert Astals Cid 2007-10-17 13:55:51 UTC
i wonder how are we supposed to transform PalatinoLinotype-Roman into Palatino-Roman.
Comment 2 Sebastien Bacher 2007-10-17 14:21:05 UTC
why don't you let fontconfig do the job there?
Comment 3 Albert Astals Cid 2007-10-17 14:31:28 UTC
So you are telling me that 
fc-match PalatinoLinotype-Roman
works for you?
Comment 4 Sebastien Bacher 2007-10-17 14:43:08 UTC
The submitter comment suggest it makes the document being rendered correctly
Comment 5 Albert Astals Cid 2007-10-17 14:47:12 UTC
then tell the submitter to come here and speak with me :-)
Comment 6 Carlos Garcia Campos 2009-08-06 02:54:17 UTC
is this still valid? and is it really cairo-backend only? I see the same font with current poppler than acroread. 
Comment 7 GitLab Migration User 2018-08-20 22:08:27 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/poppler/poppler/issues/210.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.