Evince presents PDF with mis-rendered Hebrew

Bug #485745 reported by eliad tsai on 2009-11-20
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
poppler (Ubuntu)
Low
Unassigned

Bug Description

Binary package hint: evince

1) lsb_release -rd
Description: Ubuntu Vivid Vervet (development branch)
Release: 15.04

2) apt-cache policy evince
evince:
  Installed: 3.14.1-0ubuntu1
  Candidate: 3.14.1-0ubuntu1
  Version table:
 *** 3.14.1-0ubuntu1 0
        500 http://us.archive.ubuntu.com/ubuntu/ vivid/main amd64 Packages
        100 /var/lib/dpkg/status

3) What is expected to happen opening https://bugs.launchpad.net/ubuntu/+source/evince/+bug/485745/+attachment/1057914/+files/HW4.pdf is it looks the same as it does in Adobe Reader.

4) What happens instead is it shows gibberish as per the screenshot https://launchpadlibrarian.net/36337912/Screenshot-1.gif .

WORKAROUND: Use Chromium's built-in PDF viewer.
apt-cache policy chromium-browser
chromium-browser:
  Installed: 39.0.2171.65-0ubuntu0.14.04.1.1064
  Candidate: 39.0.2171.65-0ubuntu0.14.04.1.1064
  Version table:
 *** 39.0.2171.65-0ubuntu0.14.04.1.1064 0
        500 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/universe amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ trusty-security/universe amd64 Packages
        100 /var/lib/dpkg/status
     34.0.1847.116-0ubuntu2 0
        500 http://us.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages

ProblemType: Bug
Architecture: amd64
Date: Fri Nov 20 13:27:27 2009
DistroRelease: Ubuntu 9.10
ExecutablePath: /usr/bin/evince
NonfreeKernelModules: nvidia
Package: evince 2.28.1-0ubuntu1.1
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-14.48-generic
SourcePackage: evince
Uname: Linux 2.6.31-14-generic x86_64

eliad tsai (eliadtsai) wrote :
Pedro Villavicencio (pedro) wrote :

which formula? could you take an screenshot showing the issue? Thanks.

Changed in evince (Ubuntu):
assignee: nobody → Ubuntu Desktop Bugs (desktop-bugs)
importance: Undecided → Low
status: New → Incomplete
eliad tsai (eliadtsai) wrote :

screen shot

Dimitrios Symeonidis (azimout) wrote :

Eliad, is the screenshot from the same sample file you attached? The sample pdf file is 5 pages (not one, like in your screenshot) and opens fine here, see attached screenshot!

Pedro Villavicencio (pedro) wrote :

Got the same results as Dimitros here, not confirming.

eliad tsai (eliadtsai) wrote :

something weird is happening in my computer.
now i can read the first file but i cannot read the new file i have attached.
look at this attachment.

eliad tsai (eliadtsai) wrote :

this is how the HW4.pdf file look on my computer

Dimitrios Symeonidis (azimout) wrote :

Ok, I can actually confirm that. Pedro, is there a way in Linux to select text in a pdf file and find out the underlying font?

Changed in evince (Ubuntu):
status: Incomplete → Confirmed
madbiologist (me-again) wrote :

> is there a way in Linux to select text in a pdf file and find out the underlying font?

at a command prompt, type:

pdffonts HW4.pdf

resulting output:

name type emb sub uni object ID
------------------------------------ ----------------- ------ ---- ---- -----------
Courier Type 1 no no no 5 0
Arial,Bold TrueType no no yes 8 0
Calibri,Bold TrueType no no yes 10 0
Arial TrueType no no yes 12 0
Times-Roman Type 1 no no no 13 0
Times-Italic Type 1 no no no 14 0
Symbol Type 1 no no no 15 0
Symbol CID TrueType yes no no 18 0
Arial,Bold TrueType no no no 20 0

(I've padded this with spaces as best I could - Launchpad needs a [code] tag to specify a monospaced font).

I presume emb stands for embedded.

madbiologist (me-again) wrote :

...and Launchpad has promptly taken out all the extra spaces. Wonderful.

Hopefully the attached file will be easier for everyone to read (it opens in gedit on my Karmic 9.10 system)

madbiologist (me-again) wrote :

Actually, Firefox opens my attachment natively, but it's formatted properly (in a monospaced font).

madbiologist (me-again) wrote :

HW4.pdf is still rendering incorrectly on Ubuntu 10.10 alpha 2 updated to the latest versions of poppler and Evince.

Uname: Linux 2.6.35-6-generic i686
Packages:
    evince 2.30.3-1ubuntu2
    poppler 0.14.1-0ubuntu1

I have poppler-data installed.

madbiologist (me-again) wrote :

HW4.pdf is still rendering incorrectly on Ubuntu 10.10 RC.

Uname: Linux 2.6.35-22-generic i686
Packages:
    evince 2.32.0-0ubuntu1
    poppler 0.14.3-0ubuntu1

I have poppler-data installed.

madbiologist (me-again) wrote :

HW4.pdf is still rendering incorrectly on Ubuntu 12.04.1.

Uname: Linux 3.2.0-29-generic-pae i686
Packages:
    evince 3.4.0-0ubuntu1.4
    poppler 0.18.4-1ubuntu2

I have poppler-data installed.

tags: added: karmic maverick precise
madbiologist (me-again) wrote :

HW4.pdf is still rendering incorrectly on Ubuntu 14.04 "Trusty Tahr".

evince 3.10.3-0ubuntu10
poppler 0.24.5-2ubuntu4

tags: added: trusty

Created attachment 100679
example pdf

Originally reported at https://bugs.launchpad.net/ubuntu/+source/evince/+bug/485745 in the 7th comment, and still reproducible with evince 3.10.3-0ubuntu10 and poppler 0.24.5-2ubuntu4.

The text in the attached file is badly misrendered. See the screenshot attached in the next comment.

Created attachment 100680
screenshot showing text misrendering

madbiologist (me-again) wrote :

Reported upstream.

Changed in evince:
importance: Unknown → Medium
status: Unknown → Confirmed
description: updated
tags: added: vivid
Changed in evince (Ubuntu):
assignee: Ubuntu Desktop Bugs (desktop-bugs) → nobody
status: Confirmed → Triaged
description: updated
affects: evince → poppler
summary: - unable to view formula
+ PDF presents mis-rendered Hebrew
summary: - PDF presents mis-rendered Hebrew
+ Evince presents PDF with mis-rendered Hebrew
Changed in evince:
importance: Unknown → Medium
status: Unknown → New
madbiologist (me-again) wrote :

HW4.pdf is still rendering incorrectly on Ubuntu 15.04 "Vivid Vervet"

evince 3.14.2-0ubuntu2
poppler 0.30.0-0ubuntu1

That PDF uses the hebrew chars of the arial font, but the font is not embedded:

./utils/pdffonts -subst HW4.pdf
name object ID substitute font substitute font file
------------------------------------ --------- ------------------------------------ ------------------------------------
Courier 5 0 Nimbus Mono L /usr/share/fonts/type1/gsfonts/n022003l.pfb
Arial,Bold 8 0 Liberation Sans Bold /usr/share/fonts/truetype/liberation/LiberationSans-Bold.ttf
Calibri,Bold 10 0 DejaVu Sans Bold /usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf
Arial 12 0 Liberation Sans /usr/share/fonts/truetype/liberation/LiberationSans-Regular.ttf
Times-Roman 13 0 Nimbus Roman No9 L /usr/share/fonts/type1/gsfonts/n021003l.pfb
Times-Italic 14 0 Nimbus Roman No9 L Regular Italic /usr/share/fonts/type1/gsfonts/n021023l.pfb
Symbol 15 0 Symbol /usr/share/fonts/X11/Type1/Symbol.pfb
Arial,Bold 20 0 Liberation Sans Bold /usr/share/fonts/truetype/liberation/LiberationSans-Bold.ttf

Therefore You need the unicode version of the arial font (and also arial bold) and configure fontconfig to use this/these font/s, or You should force the PDF generator to include the fonts!

Poppler doesn't deliver any fonts!

Oh, I forgot: I even haven't installed the unicode version of these fonts, so on my system I got the same output with the fonts of comment 2.
But I can render it on my windows system, where I have the MS fonts installed!

This file would be fixed by my patch in bug 93299. It provides fontconfig some hints about the character encoding so it can do better at choosing an appropriate font.

(In reply to Jason Crain from comment #4)
> This file would be fixed by my patch in bug 93299. It provides fontconfig
> some hints about the character encoding so it can do better at choosing an
> appropriate font.

May You have a look at bug 43488 and bug 41104 if Your patch of bug 93299 fixes them, too? And mark them as duplicate if so?

(In reply to Thomas Freitag from comment #5)
> May You have a look at bug 43488 and bug 41104 if Your patch of bug 93299
> fixes them, too? And mark them as duplicate if so?

No, my patch does not fix either of those. The files in both of those bugs directly use the glyph IDs to look up glyphs. Which is completely insane for a non-embedded font because glyph IDs are not in any way portable. To get them to work you could install the exact same Arial font. Not just a similar or compatible font like Liberation Sans, but Microsoft's own Arial font. Installing msttcorefonts should work. Might have to also add a fontconfig rule to match ArialMT to Arial.

*** This bug has been marked as a duplicate of bug 93299 ***

Changed in poppler:
status: Confirmed → Invalid
affects: evince (Ubuntu) → poppler (Ubuntu)
Changed in evince:
status: New → Expired

Works in Bionic from a default install with no adjustments made to fonts.

no longer affects: evince
no longer affects: poppler (Ubuntu)
affects: poppler → poppler (Ubuntu)
Changed in poppler (Ubuntu):
importance: Medium → Undecided
status: Invalid → New
importance: Undecided → Low
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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