evince does not display ligatures

Bug #1325230 reported by Kevin Dalley
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Fontconfig
Fix Released
High
fontconfig (Ubuntu)
Fix Released
Low
Unassigned
Trusty
Fix Released
Undecided
Unassigned

Bug Description

[ Description ]

When a document uses a Times font, the 'fi' ligature may not be displayed. The TeX Gyre Termes font is aliased to Times in fontconfig and does not display this correctly.

[ Development fix ]

Identical package uploaded to Utopic.

[ QA ]

Install fonts-texgyre, then download the PDF in comment #1 and check that 'file' is displayed incorrectly (no 'fi') before and correctly after.

[ Regression potential ]

Some files might display better with TeX Gyre Termes. Check a few Times documents to see that they are still okay.

[ Original description ]

The following pdf file does not display ligatures for "fi". Open the file and search for "file".

http://ceph.com/papers/weil-crush-sc06.pdf

I have attached an image of the rendering of the file, showing the word "file", though not displaying "fi".

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: evince 3.10.3-0ubuntu10
ProcVersionSignature: Ubuntu 3.13.0-27.50-generic 3.13.11
Uname: Linux 3.13.0-27-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.2
Architecture: amd64
CurrentDesktop: Unity
Date: Sat May 31 09:07:41 2014
InstallationDate: Installed on 2013-06-02 (362 days ago)
InstallationMedia: Ubuntu 13.04 "Raring Ringtail" - Release amd64 (20130424)
SourcePackage: evince
UpgradeStatus: Upgraded to trusty on 2014-04-24 (37 days ago)

Revision history for this message
In , Christopher Yeleighton (giecrilj) wrote :

<URL: http://www.cs.dartmouth.edu/~doug/mdmspe.pdf >

In Okular:
 by constructing input on the y

In GhostScript:
  by constructing input on the fly

Note: the result of copying the text out of Okular is correct.

Revision history for this message
In , Albert Astals Cid (aacid) wrote :

Works here.

Which poppler do you have?

Which freetype do you have?

Can you attach a screenshot of okular -> file -> properties -> fonts?

Revision history for this message
In , Christopher Yeleighton (giecrilj) wrote :

(In reply to comment #1)
> Works here.
>
> Which poppler do you have?

libpoppler43-0.24.3

>
> Which freetype do you have?

libfreetype6-2.5.0.1

Revision history for this message
In , Christopher Yeleighton (giecrilj) wrote :

Created attachment 91503
a screenshot of okular -> file -> properties -> fonts

Note that the selected substitution font face Tex Gyre Termes does have the ligatures in place (although I do not know which font is used to typeset the fragment with blanked ligatures).

Revision history for this message
In , Christopher Yeleighton (giecrilj) wrote :

But since Ghostscript loads NimbusRomNo9L-* early, I would say the document is typeset in Times except for embedded formulae in Computer Modern and API names in Courier.

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

What is the output of

pdffonts -subst mdmspe.pdf

Revision history for this message
In , Christopher Yeleighton (giecrilj) wrote :

name object ID substitute font substitute font file
------------------------------------ --------- ------------------------------------ ------------------------------------
Times-Italic 7 0 TeXGyreTermes-Italic /usr/share/fonts/texlive-tex-gyre/texgyretermes-italic.otf
Times-Roman 8 0 TeXGyreTermes-Regular /usr/share/fonts/texlive-tex-gyre/texgyretermes-regular.otf
Courier 9 0 Courier /usr/share/fonts/Type1/cour.pfa
Times-Bold 10 0 TeXGyreTermes-Bold /usr/share/fonts/texlive-tex-gyre/texgyretermes-bold.otf
Times-Roman 21 0 TeXGyreTermes-Regular /usr/share/fonts/texlive-tex-gyre/texgyretermes-regular.otf

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

The font in the PDF uses the name "fi" for the ligature. FT_Get_Char_Index() is used to find the glyph in the substitute font. The problem is texgyretermes-bold.ttx uses the name "f_f" for the fi ligature.

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

(In reply to comment #7)
> The font in the PDF uses the name "fi" for the ligature. FT_Get_Char_Index()
> is used to find the glyph in the substitute font. The problem is
> texgyretermes-bold.ttx uses the name "f_f" for the fi ligature.

Oops. I meant FT_Get_Name_Index() is used to lookup the glyph.

Revision history for this message
In , Christopher Yeleighton (giecrilj) wrote :

(In reply to comment #7)
> The font in the PDF uses the name "fi" for the ligature. FT_Get_Char_Index()
> is used to find the glyph in the substitute font. The problem is
> texgyretermes-bold.ttx uses the name "f_f" for the fi ligature.

I do not know what texgyretermes-bold.ttx is. The font texgyretermes-bold.otf uses the name "f_i" for the ligature "fi".

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

That was a typo. The ttx file is the font converted to xml format using the ttx utility.

Revision history for this message
In , Christopher Yeleighton (giecrilj) wrote :

The font Termes is incompatible with Times and should not be used as a replacement.

Revision history for this message
In , 1-freedesktop (1-freedesktop) wrote :

I have the same problem on Debian/Sid (unstable), which uses
libpoppler37. If I open mdmspe.pdf with Okular, Evince or GIMP then the
"fl" and "fi" ligatures are missing.

If I downgrade Okular to the version in Debian testing, which still uses
libpoppler19, then these ligatures are displayed correctly.

Both versions of Okular use the same font substitution scheme, identical
to the screenshot that Christopher attached to Comment 3. The ligatures
in texgyretermes-{roman,bold}.otf are displayed with libpoppler19 and
are missing with libpoppler37.

I hope this information helps to track down the source of the problem.

Revision history for this message
In , John M (jwmwalrus) wrote :

libpoppler19 is no longer in Debian/Jessie (testing) or Debian/Sid (unstable). With libpoppler37, the fi and fl ligatures are not displayed in evince.

The fi ligatures in "identifier", "suffix", etc., are not displayed in (Appendix A of) the following file:

www.open-std.org/jtc1/sc22/wg14/www/docs/n1494.pdf

Both gv and acroread display the ligatures properly; imagemagick's display has a massive memory leak trying to display the file (i.e., around 5GiB of RAM and 100% CPU).

Debian's reportbug recommends to report the bug directly to bugs.freedesktop.org.

$ lsb_release -rd
Description: Debian GNU/Linux testing (jessie)
Release: testing

$ apt-cache policy libpoppler37 gv acroread:i386
libpoppler37:
  Installed: 0.22.5-4
  Candidate: 0.22.5-4
  Version table:
 *** 0.22.5-4 0
        500 http://ftp.us.debian.org/debian/ testing/main amd64 Packages
        200 http://ftp.us.debian.org/debian/ unstable/main amd64 Packages
        100 /var/lib/dpkg/status
gv:
  Installed: 1:3.7.4-1
  Candidate: 1:3.7.4-1
  Version table:
 *** 1:3.7.4-1 0
        500 http://ftp.us.debian.org/debian/ testing/main amd64 Packages
        200 http://ftp.us.debian.org/debian/ unstable/main amd64 Packages
        100 /var/lib/dpkg/status
acroread:i386:
  Installed: 9.5.5-dmo1
  Candidate: 9.5.5-dmo1
  Version table:
 *** 9.5.5-dmo1 0
        100 http://www.deb-multimedia.org/ testing/non-free i386 Packages
        100 /var/lib/dpkg/status

Revision history for this message
In , Akiro (akiro) wrote :

Well, I'm not sure why this issue was reassigned to fontconfig honestly. fixing in fontconfig is the wrong direction IMHO for this kind of rendering bug. that is just a workaround and there should be the real solution in fonts and/or renderer.

Revision history for this message
In , Christopher Yeleighton (giecrilj) wrote :

(In reply to comment #14)
> Well, I'm not sure why this issue was reassigned to fontconfig honestly.
> fixing in fontconfig is the wrong direction IMHO for this kind of rendering
> bug. that is just a workaround and there should be the real solution in
> fonts and/or renderer.

Comment #11.

Revision history for this message
In , Akiro (akiro) wrote :

(In reply to comment #15)
> (In reply to comment #14)
> > Well, I'm not sure why this issue was reassigned to fontconfig honestly.
> > fixing in fontconfig is the wrong direction IMHO for this kind of rendering
> > bug. that is just a workaround and there should be the real solution in
> > fonts and/or renderer.
>
> Comment #11.

That sounds like opposed to what they say. then that should be a font bug. we could comment it out until they fix though.

Revision history for this message
In , Akiro (akiro) wrote :

commented out the lines related to TeX Gyre Termes font. please be aware this is a workaround and contact the font author to get it fixed.

Revision history for this message
In , Yarons13422 (yarons13422) wrote :

I have the same issue, and I'm running fedora 20:

poppler-0.24.3-3.fc20.x86_64
okular-4.12.3-1.fc20.x86_64
fontconfig-2.11.0-1.fc20.x86_64

a pdf that references Times and pickes up Tex Gyre Termes
instead shows missing glyphs when rendering.

The fonts on my system are picked up (using the pdffonts command above)
from a texlive 2013 install I have in place (not from the fedora repo).
Strangely, removing the otf version of Termes made okular pick
up the type1 version (It just happened to be there), and this
renders find - no missing letters on rendering.

Here's the output of pdffonts after removing the otf files,
with the file rendering properly.

```
name object ID substitute font substitute font file
------------------------------------ --------- ------------------------------------ ------------------------------------
Symbol 9 0 Symbol /usr/share/fonts/wine-symbol-fonts/symbol.ttf
Times-Roman 8 0 TeXGyreTermes /mnt/debian/texlive/2013/texmf-dist/fonts/type1/public/tex-gyre/qtmr.pfb
Times-Italic 7 0 TeXGyreTermes Italic /mnt/debian/texlive/2013/texmf-dist/fonts/type1/public/tex-gyre/qtmri.pfb
Times-Bold 6 0 TeXGyreTermes Bold /mnt/debian/texlive/2013/texmf-dist/fonts/type1/public/tex-gyre/qtmb.pfb
```

Revision history for this message
In , Christopher Yeleighton (giecrilj) wrote :

(In reply to comment #17)
> commented out the lines related to TeX Gyre Termes font. please be aware
> this is a workaround and contact the font author to get it fixed.

What makes Tex Gyre Termes so special that it must get fixed, rather than replaced with a better one?
That said, I tried to notify the authors at GUST-L but my letter was not published or replied to. Maybe they will catch up with reality when they see their font dropped, or maybe they will not.

Revision history for this message
In , Ivo Anjo (knuckles) wrote :

I'm also seeing this with latest Ubuntu 14.04 stable.

Sorry if I'm asking a stupid question, but the bug is marked as fixed but where is it fixed and how can I access the fix?

Revision history for this message
In , Tim-bockwoldt (tim-bockwoldt) wrote :

(In reply to comment #20)
> I'm also seeing this with latest Ubuntu 14.04 stable.
>
> Sorry if I'm asking a stupid question, but the bug is marked as fixed but
> where is it fixed and how can I access the fix?

Hi,
as far as I understood the font "Tex Gyre Termes" (is it a font, or what is it?) is configured to be used instead of (the font?) "Times" because it is similar?

Not knowing much about fontconfig, I found Termes configured in /etc/fonts/conf.d/30-metric-aliases.conf und /etc/fonts/conf.d/30-fonts-texgyre-aliases.conf
In both files I commented out the parts with Tex Gyre Termes relating to Times (using <!-- ... --> ) and afterwards everything is displayed fine.
So the workaround is good for me, I hope it helps other, too, but it sure doesn't FIX the bug and I'm also not sure if all those commenting out is necessary. Maybe someone could comment on this...

Revision history for this message
In , Nfxjfg (nfxjfg) wrote :

If this is a regression, then what change caused it?

Revision history for this message
In , Akiro (akiro) wrote :

(In reply to comment #22)
> If this is a regression, then what change caused it?

Not really I'd say. the change for this workaround is mentioned above. if you want a certain link to the commit:
http://cgit.freedesktop.org/fontconfig/commit/?id=c6aa4d4bfcbed14f39d070fe7ef90a4b74642ee7

It is in 2.11.1 BTW.

Revision history for this message
In , Christopher Yeleighton (giecrilj) wrote :

(In reply to comment #22)
> If this is a regression, then what change caused it?

The adoption of Termes as the default substitution for Times, I guess.

Revision history for this message
Kevin Dalley (nereocystis) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in evince (Ubuntu):
status: New → Confirmed
Revision history for this message
fubuntu (fbugs) wrote :

This could be related to https://bugs.freedesktop.org/show_bug.cgi?id=73291

A fix to this bug is provided in the bug report and linked to the following, simple commit:
http://cgit.freedesktop.org/fontconfig/commit/?id=c6aa4d4bfcbed14f39d070fe7ef90a4b74642ee7

Revision history for this message
Kevin Dalley (nereocystis) wrote :

fubuntu has the solution. I modified the file
/etc/fonts/conf.avail/30-metric-aliases.conf
and "fi" ligatures suddenly appear.

For some reason, I had trouble building the package fontconfig-config,
but it looks like the problem belongs with that package.

affects: evince (Ubuntu) → fontconfig (Ubuntu)
Changed in fontconfig (Ubuntu):
importance: Undecided → Low
Revision history for this message
Iain Lane (laney) wrote :

Thanks, I uploaded that fix to both Utopic (14.10) and Trusty (14.04) now. Trusty needs to be manually approved & verified first though, so watch out for a call for testing soon.

description: updated
Changed in fontconfig (Ubuntu Trusty):
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package fontconfig - 2.11.0-0ubuntu5

---------------
fontconfig (2.11.0-0ubuntu5) utopic; urgency=medium

  * 0001-Bug-73291-poppler-does-not-show-fl-ligature.patch: Don't alias TeX
    Gyre Termes to Times as it has a broken 'fi' ligature. (LP: #1325230)
 -- Iain Lane <email address hidden> Wed, 04 Jun 2014 17:04:05 +0100

Changed in fontconfig (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Kevin, or anyone else affected,

Accepted fontconfig into trusty-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/fontconfig/2.11.0-0ubuntu4.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in fontconfig (Ubuntu Trusty):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Kevin Dalley (nereocystis) wrote :

Yes, this new package works.

Thanks for the patch.

I installed fontconfig-config_2.11.0-0ubuntu4.1_all.deb
And now I can see the word "file".

Iain Lane (laney)
tags: added: verification-done
removed: verification-needed
Changed in fontconfig:
importance: Unknown → High
status: Unknown → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package fontconfig - 2.11.0-0ubuntu4.1

---------------
fontconfig (2.11.0-0ubuntu4.1) trusty; urgency=medium

  * 0001-Bug-73291-poppler-does-not-show-fl-ligature.patch: Don't alias TeX
    Gyre Termes to Times as it has a broken 'fi' ligature. (LP: #1325230)
 -- Iain Lane <email address hidden> Wed, 04 Jun 2014 17:04:05 +0100

Changed in fontconfig (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
Colin Watson (cjwatson) wrote : Update Released

The verification of the Stable Release Update for fontconfig has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Revision history for this message
In , Norbert Preining (preining) wrote :

Ok, I reopen this bug against poppler, as poppler seems to implement something that is in contradiction to what Adobe recommends.

I refer you to the Adobe Glyph List Specification
http://sourceforge.net/adobe/aglfn/wiki/AGL%20Specification/
which clearly states in Section 6. Assigning glyph names for new fonts:

*******
For glyphs that represent ligatures of standard Unicode characters, there are two suggested formats for their glyph names, as follows:

    1. Descriptive. The decomposition is expressed by joining the glyph names of the standard Unicode characters, in order, using an underscore (U+005F; LOW LINE). The glyph names of the characters should specify the "uni" or "u" prefixes and use uppercase hexadecimal digits, as described above, or with a name from AGL. For example, the "o f f i" ligature should be named "o_f_f_i."

    2. UV with "uni" prefix. ....
*******

Thus, poppler should check for f_i *as*well*as* fi (for backward compatibility).

Thanks

Norbert Preining
TeX Live Team

Changed in fontconfig:
status: Fix Released → Confirmed
Revision history for this message
In , Fabian Greffrath (fabian+debian) wrote :

I have attached a new patch to #80093 that could use some review.

Thanks

Fabian

Revision history for this message
In , Fabian Greffrath (fabian+debian) wrote :

I am re-assigning this bug report to fontconfig.

Dear fontconfig-devs,

now that a proper fix for the missing ligature glyphs in Tex Gyre Termes has made it into poppler [0,1], could you please revert the commit [2] to fontconfig that disabled Termes as a metric alias for Times?

Thank you so much!

Fabian

[0] https://bugs.freedesktop.org/show_bug.cgi?id=80093#c16
[1] http://cgit.freedesktop.org/poppler/poppler/commit/?id=01723aa17e836e818158dbdc56df642a290be300
[2] http://cgit.freedesktop.org/fontconfig/commit/conf.d/30-metric-aliases.conf?id=c6aa4d4bfcbed14f39d070fe7ef90a4b74642ee7

Revision history for this message
In , Akiro (akiro) wrote :

revert the change in git. thanks!

Changed in fontconfig:
status: Confirmed → Fix Released
Revision history for this message
hede (michael-heide) wrote :

 TeX Gyre Heros seems also affected. Is this related? See Bug #1379375 .

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.