Bug 36536 - Non-embedded standard fonts in PDF files are not displayed/rendered correctly
Summary: Non-embedded standard fonts in PDF files are not displayed/rendered correctly
Status: RESOLVED MOVED
Alias: None
Product: poppler
Classification: Unclassified
Component: cairo backend (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: low minor
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-23 21:12 UTC by rusivi
Modified: 2018-08-20 21:33 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
PDF sample for Evince (4.84 KB, application/pdf)
2011-04-23 21:12 UTC, rusivi
Details
adjust substitute font width using first character in each string (5.00 KB, patch)
2012-02-15 02:57 UTC, Adrian Johnson
Details | Splinter Review
Test results examples (533.06 KB, application/octet-stream)
2012-11-21 13:54 UTC, Carlos Garcia Campos
Details

Description rusivi 2011-04-23 21:12:11 UTC
Created attachment 46013 [details]
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
Comment 1 Adrian Johnson 2012-02-15 02:57:57 UTC
Created attachment 57075 [details] [review]
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.
Comment 2 Germán Poo-Caamaño 2012-10-07 10:35:03 UTC
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
Comment 3 Albert Astals Cid 2012-11-19 21:26:58 UTC
Adrian do you think this needs to go in? What about the comments by Germán?
Comment 4 Adrian Johnson 2012-11-20 10:57:20 UTC
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?
Comment 5 Carlos Garcia Campos 2012-11-21 13:53:50 UTC
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.
Comment 6 Carlos Garcia Campos 2012-11-21 13:54:56 UTC
Created attachment 70366 [details]
Test results examples

Let me know if you want me to send the PDFs to you
Comment 7 madbiologist 2015-01-12 13:52:41 UTC
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
Comment 8 Jason Crain 2016-02-19 04:54:31 UTC
The "narrow text" part of this should be fixed with bug 94054.
Comment 9 GitLab Migration User 2018-08-20 21:33:34 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/9.


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.