Bug 848717

Summary: Okular doesn't display ligatures in certain PDF documents
Product: [openSUSE] openSUSE 13.1 Reporter: FSF Bugs <fsfbugs>
Component: OtherAssignee: Bjørn Lie <zaitor>
Status: RESOLVED UPSTREAM QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: ctrippe, forgotten_-z4SIGzSs7, psychonaut, schwab
Version: Final   
Target Milestone: ---   
Hardware: x86-64   
OS: SUSE Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: The abstract of the paper linked above as rendered by Okular.
Screenshot comparing main window and print preview redering of 'excel.pdf'

Description FSF Bugs 2013-11-01 19:47:11 UTC
Created attachment 565923 [details]
The abstract of the paper linked above as rendered by Okular.

User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Firefox/24.0

Since updating to openSUSE 13.1 RC2 from 12.3, some Okular no longer displays ligatures (specifically ? and ? but I suspect other too) in certain PDF documents.

Reproducible: Always

Steps to Reproduce:
Open https://research.microsoft.com/en-us/um/people/simonpj/papers/excel/excel.pdf in Okular.
Actual Results:  
See second line of the abstract. The ligature '?' in 'de?ned' is not being displayed (c.f. attached screenshot).


I'm using (version numbers reported by zypper):

okular 4.11.2-1.1
libpoppler43 0.24.2-1.1
fontconfig 2.11.0-1.1
Comment 1 FSF Bugs 2013-11-01 20:28:26 UTC
I've now tested the same PDF document with evince and MuPDF. Evince exhibits the same problem whereas MuPDF renders the document correctly. So I suspect it's a bug related to poppler rather than Okular.
Comment 2 Christian Trippe 2013-11-04 06:23:04 UTC
Assigning to the poppler maintainer according to comment 1.
Comment 3 FSF Bugs 2013-12-03 19:24:34 UTC
After reading an Ubuntu bug report [1], I tried viewing the same PDF using the 'Print Preview' functionality and, lo and behold, all ligatures are rendered correctly.

I find it curious that I am experiencing exactly the opposite problem to a bug [1] reported and fixed earlier this year. Maybe they are related?

[1] https://bugs.launchpad.net/ubuntu/+source/cairo/+bug/1107949
Comment 4 FSF Bugs 2013-12-03 19:26:28 UTC
Created attachment 570034 [details]
Screenshot comparing main window and print preview redering of 'excel.pdf'
Comment 5 Forgotten User -z4SIGzSs7 2014-02-05 08:09:17 UTC
This bugs also shows up in my case. Evince, okular and qpdfview (all poppler) don't show ligatures in some documents. Mupdf, acroread display them correctly.

There is a small twist compared to the report before: The ligatures are also missing in the print preview of evince.

As an example take the document
http://arxiv.org/pdf/1402.0505v1
The word finite in the 4th line of the abstract is missing the "fi"

Versions used:
evince 3.10.0-18.3
okular 4.11.5-150.1
libpoppler43 0.24.3-4.1
Comment 6 FSF Bugs 2014-02-24 22:42:16 UTC
The bug has now been reported upstream at [1].

A work-around that may or may not be appropriate is to decrease the priority of the font 'TeX Gyre Termes' in the list of appropriate substitutes for 'Times'.

Specifically, find the section

	<alias binding="same">
	  <family>Times</family>
	  <accept>
	  <family>TeX Gyre Termes</family>
	  <family>Nimbus Roman No9 L</family>
	  </accept>
	</alias>

in file

	/etc/fonts/conf.d/30-metric-aliases.conf

and swap the line containing 'TeX Gyre Termes' with the line below. That does the trick for me.


[1] https://bugs.freedesktop.org/show_bug.cgi?id=73291
Comment 7 Forgotten User -z4SIGzSs7 2014-02-27 17:23:59 UTC
Thanks, the workaround does help in my case as well.
Comment 8 Christian Trippe 2014-03-19 06:16:28 UTC
*** Bug 869008 has been marked as a duplicate of this bug. ***
Comment 9 Andreas Schwab 2014-03-19 08:14:33 UTC
You can also link /etc/fonts/conf.avail/58-texlive-tex-gyre.conf to /etc/fonts/conf.d.
Comment 10 Bjørn Lie 2015-01-26 12:07:01 UTC
https://bugs.freedesktop.org/show_bug.cgi?id=80093#c16

Fix have been committed upstream.
Release with fix included should now have landed in Factory.

If someone wants to backport the fix to 13.1/13.2 feel free to do so.