Bug 927466 - poppler: does not display standard ligatures correctly
poppler: does not display standard ligatures correctly
Status: RESOLVED FIXED
Classification: openSUSE
Product: openSUSE 13.1
Classification: openSUSE
Component: X.Org
Final
All openSUSE 42.1
: P3 - Medium : Normal (vote)
: ---
Assigned To: Petr Gajdos
E-mail List
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-04-16 13:43 UTC by Dmitri Chubarov
Modified: 2016-04-27 19:21 UTC (History)
7 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
A pdf document with ligatures and Times-Roman font not embedded (1.41 KB, application/pdf)
2015-04-16 13:45 UTC, Dmitri Chubarov
Details
diff with Tex Gyre fonts commented (1.30 KB, text/plain)
2015-04-16 13:46 UTC, Dmitri Chubarov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitri Chubarov 2015-04-16 13:43:31 UTC
User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:37.0) Gecko/20100101 Firefox/37.0
Build Identifier: 

Tex Gyre fonts miss common ligatures such as fl and fi. When a text containing ligatures is rendered in poppler clients using Tex Gyre fonts, whitespace is rendered instead of the ligatures: "Get fire in a flash" is rendered as "Get  re in a  ash".

Reproducible: Always

Steps to Reproduce:
1-a. Use an attach pdf file "fireflash.pdf" or 
1-b. Generate a new tex file fireflash.tex containing "fl" and "fi" strings using `mathptmx' or `times' packages and compile a pdf with command `pdflatex "\pdfmapfile{=pdftex_ndl14.map} \input" fireflash.tex'
2. Open fireflash.pdf in evince or ocular.

Actual Results:  
The ligatures are not rendered. The text is rendered with Tex Gyre fonts

Expected Results:  
The ligatures should be rendered. The text should be rendered with Nimbus Roman fonts.

The problem is with the fontconfig configuration. The /etc/fonts/conf.d/30-metric-aliases.conf file should not contain instructions to replace Helvetica and Times with Tex Gyre fonts ahead of Nimbus fonts.

Will attach a pdf file with ligatures and fonts not embedded for testing and a diff of the fontconfig 30-metric-aliases.conf.

Similar issues in Ubuntu 
https://bugs.launchpad.net/ubuntu/+source/fontconfig/+bug/1317599
and in Debian
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=507505
Comment 1 Dmitri Chubarov 2015-04-16 13:45:07 UTC
Created attachment 631294 [details]
A pdf document with ligatures and Times-Roman font not embedded
Comment 2 Dmitri Chubarov 2015-04-16 13:46:40 UTC
Created attachment 631295 [details]
diff with Tex Gyre fonts commented
Comment 3 Stefan Dirsch 2015-04-16 16:08:22 UTC
Issue has been fixed upstream with this git commit:

http://cgit.freedesktop.org/fontconfig/commit/?id=b732bf057f4b3ec3bac539803005e9c42d056b2a

on 2014-11-06. It came after fontconfig 2.11.1 release (2014-03-23), which is on openSUSE 13.2. So the same issue to be expected there. IMO we should at least add the fix to factory. Reassigning to Petr, our font(config) expert.
Comment 4 Dmitri Chubarov 2015-04-16 16:37:21 UTC
Tried the 30-metric-aliases.conf from fontconfig 2014-11-06 commit (http://cgit.freedesktop.org/fontconfig/plain/conf.d/30-metric-aliases.conf?id=b732bf057f4b3ec3bac539803005e9c42d056b2a). 

With this conf file it substitutes TeXGyreTermes-Regular for Times-Roman, and I get the same "re in a ash" output.
Comment 5 Petr Gajdos 2015-04-21 07:50:45 UTC
If I understand 

https://bugs.freedesktop.org/show_bug.cgi?id=73291

comment 25 - comment 27 I think the real fix was made in poppler:

http://cgit.freedesktop.org/poppler/poppler/commit/?id=01723aa17e836e818158dbdc56df642a290be300

and struggling around in fontconfig just a workaround.
Comment 6 Petr Gajdos 2015-04-21 08:42:15 UTC
Tested on 13.2. I can reproduce the issue (uncomenting TeX Gyre Fonts aliases to Times) and I can confirm that poppler fix from previous comment fixes it.
Comment 7 Petr Gajdos 2015-04-21 09:05:06 UTC
CC opensuse maintainer of poppler.
Comment 8 Petr Gajdos 2015-04-21 09:31:57 UTC
Please try poppler packages from

http://download.opensuse.org/repositories/home:/pgajdos:/maintenance:/poppler/openSUSE_13.1_Update/

Exchanging libpoppler43 should be enough.
Comment 9 Dmitri Chubarov 2015-04-21 14:40:20 UTC
Peter,

I could not get the problem fixed with the patched library.

Here is what I did.
1. zypper ar http://download.opensuse.org/repositories/home:/pgajdos:/maintenance:/poppler/openSUSE_13.1_Update/ pgajdos
2. zypper up libpoppler43
This fails with a message: There is an update candidate for 'libpoppler43', but it is from a different vendor. Use 'zypper install libpoppler43-0.24.3-16.1.x86_64' to install this candidate.
3. zypper install libpoppler43-0.24.3-16.1.x86_64
This succeeds
4. Restore original fontconfig metric-aliases.conf
5. Run evince on an document with standard fonts not embedded.
Got Tex Gyro fonts substituted for Times-Roman, no ligatures displayed
6. To verify that we are using the new library run 
strace -f /usr/bin/evince fireflash.pdf 2>&1 | grep libpoppler
Get 
[pid 31565] open("/usr/lib64/libpoppler-glib.so.8", O_RDONLY|O_CLOEXEC <unfinished ...>
[pid 31565] open("/usr/lib64/libpoppler.so.43", O_RDONLY|O_CLOEXEC <unfinished ...>
7. Check that libpoppler is the new library
ls -l /usr/lib64/libpoppler.so.43*
lrwxrwxrwx 1 root root      20 Apr 21 20:15 /usr/lib64/libpoppler.so.43 -> libpoppler.so.43.0.0
-rwxr-xr-x 1 root root 2550752 Apr 21 15:23 /usr/lib64/libpoppler.so.43.0.0

Looking on the file date it appears to be the new library, yet the mapping does not seem to work.

Can I do anything else to debug this issue?
Comment 10 Petr Gajdos 2015-04-22 15:32:58 UTC
Today I tested with 13.1 too.

I needed to exchange also libpoppler-glib8 if I tested with evince.

For okular, libpoppler43 was enough.

Better?
Comment 11 Dmitri Chubarov 2015-04-23 06:42:42 UTC
Petr,

I confirm that with the new libpoppler43 and libpoppler-glib8 the ligatures are correctly displayed with Tex Gyre fonts in evince on OpenSuSE 13.1
Comment 12 Petr Gajdos 2015-04-23 07:13:03 UTC
Bjørn, maintenance, please look at mr#298729.
Comment 13 Benjamin Brunner 2015-04-23 07:27:51 UTC
From the maintenance-side your fix looks good to me. Thanks.

When Bjørn agrees, we can start the update.
Comment 14 Petr Gajdos 2015-04-27 07:47:16 UTC
Maintenance request was accepted.
Comment 15 Swamp Workflow Management 2015-04-30 11:05:00 UTC
openSUSE-RU-2015:0806-1: An update that has one recommended fix can now be installed.

Category: recommended (moderate)
Bug References: 927466
CVE References: 
Sources used:
openSUSE 13.2 (src):    poppler-0.26.5-3.1, poppler-qt-0.26.5-3.1, poppler-qt5-0.26.5-3.1
openSUSE 13.1 (src):    poppler-0.24.3-15.1, poppler-qt-0.24.3-15.1
Comment 16 Bernhard Schommer 2015-12-17 11:48:04 UTC
This bug was reported for openSUSE 13.1 and still fails for openSUSE 42.1. I'm adjusting the version
Comment 17 Andreas Stieger 2015-12-17 12:07:55 UTC
Clearing old needinfo.

(In reply to Bernhard Schommer from comment #16)
> This bug was reported for openSUSE 13.1 and still fails for openSUSE 42.1.
> I'm adjusting the version

openSUSE:Leap:42.1/poppler 0.24.4 was inherited from SUSE:SLE-12:GA did not receive the fix http://cgit.freedesktop.org/poppler/poppler/commit/?id=01723aa17e836e818158dbdc56df642a290be30 which first appeared in 0.28.0

We can request to have this included in the next available poppler maintenance release for SLE which will then be copied to Leap 42.1, or fork the package of an openSUSE maintainer steps up.
Comment 18 Marcus Meissner 2015-12-17 13:01:46 UTC
Petr, can you review applicability to SLES?
Comment 19 Petr Gajdos 2015-12-17 14:46:46 UTC
Sure, see #86118.

maint-coord, could we please proceed with the update, thanks.
Comment 21 Leonardo Chiquitto 2015-12-28 18:53:39 UTC
On the way to QAM.
Comment 22 Swamp Workflow Management 2016-01-04 22:12:12 UTC
SUSE-RU-2016:0017-1: An update that has two recommended fixes can now be installed.

Category: recommended (low)
Bug References: 914316,927466
CVE References: 
Sources used:
SUSE Linux Enterprise Software Development Kit 12-SP1 (src):    poppler-0.24.4-9.2, poppler-qt-0.24.4-9.1
SUSE Linux Enterprise Software Development Kit 12 (src):    poppler-0.24.4-9.2, poppler-qt-0.24.4-9.1
SUSE Linux Enterprise Server 12-SP1 (src):    poppler-0.24.4-9.2, poppler-qt-0.24.4-9.1
SUSE Linux Enterprise Server 12 (src):    poppler-0.24.4-9.2, poppler-qt-0.24.4-9.1
SUSE Linux Enterprise Desktop 12-SP1 (src):    poppler-0.24.4-9.2, poppler-qt-0.24.4-9.1
SUSE Linux Enterprise Desktop 12 (src):    poppler-0.24.4-9.2, poppler-qt-0.24.4-9.1
Comment 23 Swamp Workflow Management 2016-01-22 17:11:46 UTC
openSUSE-RU-2016:0203-1: An update that has three recommended fixes can now be installed.

Category: recommended (moderate)
Bug References: 914316,927466,953957
CVE References: 
Sources used:
openSUSE Leap 42.1 (src):    kfilemetadata5-5.16.0-6.1, poppler-0.24.4-7.1, poppler-qt-0.24.4-7.1, poppler-qt5-0.24.4-7.1
Comment 24 Swamp Workflow Management 2016-02-09 14:11:31 UTC
openSUSE-RU-2016:0392-1: An update that has three recommended fixes can now be installed.

Category: recommended (moderate)
Bug References: 914316,927466,953957
CVE References: 
Sources used:
openSUSE Leap 42.1 (src):    kdepim-15.12.1-12.2, poppler-0.24.4-9.1, poppler-qt-0.24.4-9.1, poppler-qt5-0.24.4-9.1