Non-embedded standard fonts in PDF files are not displayed/rendered correctly

Bug #667752 reported by corax
36
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Evince
Invalid
Undecided
Unassigned
libcairo
Unknown
Low
cairo (Ubuntu)
Confirmed
Undecided
Unassigned
evince (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

Binary package hint: evince

1)
Natty:
lsb_release -rd
Description: Ubuntu Natty (development branch)
Release: 11.04

Maverick:
lsb_release -rd
Description: Ubuntu 10.10
Release: 10.10

Lucid:
Ubuntu 10.04 Lucid Lynx (amd64)

2)
Natty:
apt-cache policy acroread
acroread:
  Installed: 9.4.2-0natty1
  Candidate: 9.4.2-0natty1
  Version table:
 *** 9.4.2-0natty1 0
        500 http://archive.canonical.com/ubuntu/ natty/partner i386 Packages 100 /var/lib/dpkg/status

apt-cache policy evince
evince:
  Installed: 2.32.0-0ubuntu12.1
  Candidate: 2.32.0-0ubuntu12.1
  Version table:
 *** 2.32.0-0ubuntu12.1 0
        500 http://us.archive.ubuntu.com/ubuntu/ natty-proposed/main i386
Packages
        100 /var/lib/dpkg/status
     2.32.0-0ubuntu12 0
        500 http://us.archive.ubuntu.com/ubuntu/ natty/main i386 Packages

apt-cache policy libcairo2
libcairo2:
  Installed: 1.10.2-2ubuntu2
  Candidate: 1.10.2-2ubuntu2
  Version table:
 *** 1.10.2-2ubuntu2 0
        500 http://us.archive.ubuntu.com/ubuntu/ natty/main i386 Packages 100 /var/lib/dpkg/status

Maverick:
apt-cache policy evince
evince:
  Installed: 2.32.0-0ubuntu1
  Candidate: 2.32.0-0ubuntu1
  Version table:
 *** 2.32.0-0ubuntu1 0
        500 http://us.archive.ubuntu.com/ubuntu/ maverick/main i386 Packages
        100 /var/lib/dpkg/status

apt-cache policy libcairo2
libcairo2:
  Installed: 1.10.0-1ubuntu3
  Candidate: 1.10.0-1ubuntu3
  Version table:
 *** 1.10.0-1ubuntu3 0
        500 http://us.archive.ubuntu.com/ubuntu/ maverick-updates/main i386 Packages
        100 /var/lib/dpkg/status
     1.10.0-1ubuntu2 0
        500 http://us.archive.ubuntu.com/ubuntu/ maverick/main i386 Packages

apt-cache policy acroread
acroread:
  Installed: 9.4-1maverick1
  Candidate: 9.4-1maverick1
  Version table:
 *** 9.4-1maverick1 0
        500 http://archive.canonical.com/ubuntu/ maverick/partner i386 Packages
        100 /var/lib/dpkg/status

3) When viewing PDF attachment "PDF sample for Evince", which has font "Times Roman" or "Helvetica", the text looks different in Evince in comparison to Adobe Reader.

4) What is expected is that it looks the same in both.

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: evince 2.30.3-0ubuntu1.1
ProcVersionSignature: Ubuntu 2.6.32-25.45-generic 2.6.32.21+drm33.7
Uname: Linux 2.6.32-25-generic x86_64
Architecture: amd64
Date: Thu Oct 28 13:51:21 2010
InstallationMedia: Ubuntu 10.04 "Lucid Lynx" - Release Candidate amd64 (20100419.1)
ProcEnviron:
 LANG=en_DK.utf8
 SHELL=/bin/bash
SourcePackage: evince

Revision history for this message
corax (cpp) wrote :
Revision history for this message
corax (cpp) wrote :

Here is an example1 of how a portion of a PDF-file is displayed in Adobe Reader. Showing it correctly.

Revision history for this message
corax (cpp) wrote :

Here is an example1 of how a portion of a PDF-file is displayed in Evince. Showing it incorrectly.

Revision history for this message
rusivi2 (rusivi2-deactivatedaccount) wrote :

corax, thank you for reporting this bug and helping to make Ubuntu better. In Maverick, opened a new OOo Writer document, created text with Helvecta & Times New Roman fonts, exported as PDF, looks good in both Adobe Reader & Evince (please see attached PDF file & screenshot). As per our IRC discussion, please attach a PDF file that demonstrates the reported problem and toggle the status to new. Marking incomplete.

lsb_release -rd
Description: Ubuntu 10.10
Release: 10.10

apt-cache policy openoffice.org-writer
openoffice.org-writer:
  Installed: 1:3.2.1-7ubuntu1
  Candidate: 1:3.2.1-7ubuntu1
  Version table:
 *** 1:3.2.1-7ubuntu1 0
        500 http://us.archive.ubuntu.com/ubuntu/ maverick/main i386 Packages
        100 /var/lib/dpkg/status

apt-cache policy evince
evince:
  Installed: 2.32.0-0ubuntu1
  Candidate: 2.32.0-0ubuntu1
  Version table:
 *** 2.32.0-0ubuntu1 0
        500 http://us.archive.ubuntu.com/ubuntu/ maverick/main i386 Packages
        100 /var/lib/dpkg/status

apt-cache policy acroread
acroread:
  Installed: 9.4-1maverick1
  Candidate: 9.4-1maverick1
  Version table:
 *** 9.4-1maverick1 0
        500 http://archive.canonical.com/ubuntu/ maverick/partner i386 Packages
        100 /var/lib/dpkg/status

Changed in evince (Ubuntu):
status: New → Incomplete
Revision history for this message
corax (cpp) wrote :

The best I can provide for now is info on the issue as I haven't been able to find another online generated PDF file that doesn't use Embedded fonts.

The "Example.pdf" you've attached to this issue is using Embedded-fonts ... AND ... the embedded fonts are not Times Roman or Helvetica (only their linux substitutes). But if you can generate or create a PDF-document with the following three non-embedded fonts - "Times Roman"(type 1), "Helvetica"(type 1) and "Helvetica-Bold"(type 1) ... and show that all three texts inside the document are displayed the same in both Adobe Reader and Evince ... then the bug is something else.
However I'm not able to use OpenOffice Writer to create examples as it will embed the fonts and/or insert the substitute fonts.
If you have a method for generating PDFs, that can allow me to select the non-embedded fonts, then plz let me know and I'll make an example available in this bug-report.

Revision history for this message
Marcel Stimberg (marcelstimberg) wrote :

Hi,
I can't reproduce your issue here (Ubuntu 10.10). Attached is a (latex-generated) file with Times Roman and Helvetica but not using font embedding. The file renders fine.

Revision history for this message
corax (cpp) wrote :

Thank you very much Marcel for you sample and your help. Can you generate one more PDF that also includes the Helvetica-Bold font (type 1) ?. So all three mentioned fonts are there. Just to be sure.
(and only if possible can you upload a PDF1.6-version as well... not important)

Revision history for this message
Marcel Stimberg (marcelstimberg) wrote :

Ok, the attached document contains all three fonts:
$ pdffonts times_helvetica_bold.pdf
name type emb sub uni object ID
------------------------------------ ----------------- --- --- --- ---------
Helvetica Type 1 no no no 9 0
Times-Roman Type 1 no no no 8 0
Helvetica-Bold Type 1 no no no 10 0

I don't know how to use latex and dvipdf to create a PDF 1.6 doc, though.

Revision history for this message
corax (cpp) wrote :

I think I'm a bit closer in understanding the issue. Thanx to Marcel's PDF creations (thank you Marcel, very appreciated), I've had a file for comparison. As I suspected, there is an "encoding"-problem or maybe rather an "encoding-interpretation"-problem. When creating a PDF through PostScript, the issue becomes "ironed" out, so this issue only arises when creating PDFs directly (like on-demand, streaming PDF's on the internet). My guess is that when Evince encounters an encoding that hasn't been implemented or can't be read, it assumes the encoding should be "Identity-H" (see the following links)

http://indesignsecrets.com/cid-identity-h-fonts-are-back.php

http://www.talkgraphics.com/showthread.php?33648-What-is-identity-H

Where as xPDF and Adobe Reader, either has the encoding implemented or assumes the encoding is "Custom", but display it as "Ansi". Evince displays it as "Identity-H" an tries to draw the text/letters as some weird font or attached vector-graphics image. So there is probably two issues ...one is the PDF creation, which is not always done "beautifully" ...two is the rendering, which doesn't always account for PDF-format discrepancies.
But either way, I would still recommend that the interpretation of discrepancies in Evince should be the same as Adobe Reader and xpdf. (even though I'm a believer of creating data-files according to their definition as agreed)

For further testing, you would proberly need to create a PDF that uses the non-embedded fonts AND is created directly, without using any form of PostScript. (I'll would suggest PDFLib - www.pdflib.com)

Revision history for this message
corax (cpp) wrote :

PDFLib had a java-library, so I took the liberty of creating a sample. See for yourself an compare in Adobe Reader, xPDF and Evince.

Revision history for this message
rusivi2 (rusivi2-deactivatedaccount) wrote :

In Maverick, Attachment "PDF sample for Evince" shows a discrepancy between evince & acroread. Marking confirmed.

lsb_release -rd
Description: Ubuntu 10.10
Release: 10.10

apt-cache policy acroread
acroread:
  Installed: 9.4-1maverick1
  Candidate: 9.4-1maverick1
  Version table:
 *** 9.4-1maverick1 0
        500 http://archive.canonical.com/ubuntu/ maverick/partner i386 Packages
        100 /var/lib/dpkg/status

apt-cache policy evince
evince:
  Installed: 2.32.0-0ubuntu1
  Candidate: 2.32.0-0ubuntu1
  Version table:
 *** 2.32.0-0ubuntu1 0
        500 http://us.archive.ubuntu.com/ubuntu/ maverick/main i386 Packages
        100 /var/lib/dpkg/status

Changed in evince (Ubuntu):
status: Incomplete → Confirmed
C de-Avillez (hggdh2)
Changed in evince (Ubuntu):
importance: Undecided → Medium
C de-Avillez (hggdh2)
Changed in evince (Ubuntu):
status: Confirmed → Triaged
Changed in evince:
importance: Unknown → High
status: Unknown → New
Revision history for this message
steffmeister (steffed) wrote :

Sorry for making some noise if this does not fit here, but I have a PDF where fonts seem also to be missing, I attach it, maybe it can be helpful.

Revision history for this message
corax (cpp) wrote :

The problem/issue still exists .. both in Lucid and in Maverick.
Are there any news, development or timetable in regards to this bug?

Changed in evince:
importance: High → Low
Revision history for this message
In , rusivi2 (rusivi2-deactivatedaccount) wrote :

Created attachment 46013
PDF sample for Evince

Evince bug may be found at:
https://bugzilla.gnome.org/show_bug.cgi?id=633843

Downstream bug may be found at:
https://bugs.launchpad.net/ubuntu/+source/evince/+bug/667752

In Maverick, Attachment "PDF sample for Evince" shows a discrepancy between how
it is displayed in evince versus acroread. Advised by Evince developer post bug here.

lsb_release -rd
Description: Ubuntu 10.10
Release: 10.10

apt-cache policy acroread
acroread:
  Installed: 9.4-1maverick1
  Candidate: 9.4-1maverick1
  Version table:
 *** 9.4-1maverick1 0
        500 http://archive.canonical.com/ubuntu/ maverick/partner i386 Packages
        100 /var/lib/dpkg/status

apt-cache policy evince
evince:
  Installed: 2.32.0-0ubuntu1
  Candidate: 2.32.0-0ubuntu1
  Version table:
 *** 2.32.0-0ubuntu1 0
        500 http://us.archive.ubuntu.com/ubuntu/ maverick/main i386 Packages
        100 /var/lib/dpkg/status

apt-cache policy libcairo2
libcairo2:
  Installed: 1.10.0-1ubuntu3
  Candidate: 1.10.0-1ubuntu3
  Version table:
 *** 1.10.0-1ubuntu3 0
        500 http://us.archive.ubuntu.com/ubuntu/ maverick-updates/main i386 Packages
        100 /var/lib/dpkg/status
     1.10.0-1ubuntu2 0
        500 http://us.archive.ubuntu.com/ubuntu/ maverick/main i386 Packages

description: updated
Changed in libcairo:
importance: Unknown → Low
status: Unknown → Confirmed
Revision history for this message
corax (cpp) wrote :

There are still issues in Evince in the upcoming release 11.04 (beta2)

description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in cairo (Ubuntu):
status: New → Confirmed
Revision history for this message
In , Adrian Johnson (ajohnson-redneon) wrote :

Created attachment 57075
adjust substitute font width using first character in each string

There are two problems here:
 1) The "hello world" text is too narrow
 2) The "www.pdflib.com" text has spike on each path segment.

The first problem is caused by the code that adjusts the size of text drawn with a substituted font to match the width in the pdf file. This code matches the width of the letter 'm' in the font with the width in the pdf file. The problem in this case is the pdf file has bogus widths for characters not used included the letter 'm'. The attached patch fixes this by using the first letter of each string to set the font size.

The second problem is a cairo bug. In this case the pdf file is stroking the outline of a Type 3 font. Each glyph in the Type 3 font strokes a path. Cairo needs to implement stroke to path to make this work correctly.

Revision history for this message
In , Germán Poo-Caamaño (gpoo) wrote :

FWIW, it complains with hundreds of messages like:

Syntax Error (6326): No font in show/space
Syntax Error: Unknown font tag 'F1.1'
Syntax Error (6337): No font in show
Syntax Error: Unknown font tag 'F1.1'
Syntax Error (6347): No font in show
Syntax Error: Unknown font tag 'F1.1'
Syntax Error (6365): No font in show/space
Syntax Error: Unknown font tag 'F1.1'
Syntax Error (6371): No font in show/space
Syntax Error: Unknown font tag 'F1.1'
Syntax Error (6379): No font in show/space
Syntax Error: Unknown font tag 'F1.1'
Syntax Error (6384): No font in show/space
Syntax Error: Unknown font tag 'F1.1'
Syntax Error (6389): No font in show/space

Changed in evince:
status: New → Unknown
Revision history for this message
In , Albert Astals Cid (aacid) wrote :

Adrian do you think this needs to go in? What about the comments by Germán?

Revision history for this message
In , Adrian Johnson (ajohnson-redneon) wrote :

Carlos, could you review the patch.

I don't see the Syntax Error messages. Maybe it depends on the font. What does pdffonts -subst show?

Revision history for this message
In , Carlos Garcia Campos (carlosgc) wrote :

The problem with the patch is that in some cases it's clear that it improves the output, but in some others I have doubts whether the output is better or worse, I'll attach some examples found while running my tests.

Revision history for this message
In , Carlos Garcia Campos (carlosgc) wrote :

Created attachment 70366
Test results examples

Let me know if you want me to send the PDFs to you

Revision history for this message
corax (cpp) wrote :

This problem is still here in Ubuntu 14.04 LTS ... and it has become a serious matter.
More and more of my own customers are switching to Ubuntu, which is a positive thing IMO. But with the increasing use of online web-services to handle billing, document exchanges and online-shopping ... more and more streaming-PDF files are being created on-the-fly as everyone is expected to be able to read that particular format. But when people can't read the amount due on an invoice or the delivery-date on a webshopping receipt, because the font-rendering of the pre-installed document viewer in Ubuntu won't display them correctly (or sometimes not at all), it really becomes highly inconvenient for both regular users as well as more experienced user. The Adobe Reader installation package is no longer available in ubuntu 14.04's standard repositories, which was a go-to option for the more experienced user.
SO BUCKLE UP PEOPLE, let's see if we can't fix this issue. And hopefully before we use a couple of gigabytes on the web in forum- and chatlogs about the subject of creating temporary fixes and work-arounds of such a basic thing.

best of luck to all

Revision history for this message
In , madbiologist (me-again) wrote :

Posted in the downstream bug report by the original bug reporter on 17th September 2014:

This problem is still here in Ubuntu 14.04 LTS ... and it has become a serious matter.
More and more of my own customers are switching to Ubuntu, which is a positive thing IMO. But with the increasing use of online web-services to handle billing, document exchanges and online-shopping ... more and more streaming-PDF files are being created on-the-fly as everyone is expected to be able to read that particular format. But when people can't read the amount due on an invoice or the delivery-date on a webshopping receipt, because the font-rendering of the pre-installed document viewer in Ubuntu won't display them correctly (or sometimes not at all), it really becomes highly inconvenient for both regular users as well as more experienced user. The Adobe Reader installation package is no longer available in ubuntu 14.04's standard repositories, which was a go-to option for the more experienced user.
SO BUCKLE UP PEOPLE, let's see if we can't fix this issue. And hopefully before we use a couple of gigabytes on the web in forum- and chatlogs about the subject of creating temporary fixes and work-arounds of such a basic thing.

best of luck to all

Revision history for this message
dino99 (9d9) wrote :

# 633843 RESOLVED NOTGNOME

Changed in evince:
importance: Low → Undecided
status: Unknown → New
status: New → Invalid
Changed in evince (Ubuntu):
status: Triaged → Invalid
Revision history for this message
In , Jason Crain (jcrain) wrote :

The "narrow text" part of this should be fixed with bug 94054.

Revision history for this message
madbiologist (me-again) wrote :

The fix mentioned in comment #26 is included in poppler 0.43.0. Ubuntu 16.10 "Yakkety Yak" is scheduled for release on 20th October 2016 and will contain poppler 0.44.0-3ubuntu2.

Revision history for this message
In , Gitlab-migration (gitlab-migration) wrote :

-- 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/9.

Changed in libcairo:
status: Confirmed → Unknown
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.