Bug 31821 - Writer ignores OpenType ligatures.
Summary: Writer ignores OpenType ligatures.
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected)
Inherited From OOo
Hardware: Other Linux (All)
: medium major
Assignee: Not Assigned
Whiteboard: target:3.7.0
: 47995 (view as bug list)
Depends on:
Reported: 2010-11-21 10:29 UTC by Petr Tomasek
Modified: 2014-11-12 21:03 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:

Testing OTF font (2.66 KB, application/x-font-opentype)
2010-11-21 10:29 UTC, Petr Tomasek
Test file (8.01 KB, application/vnd.oasis.opendocument.text)
2010-11-21 10:30 UTC, Petr Tomasek
Testing font source file (5.29 KB, application/vnd.font-fontforge-sfd)
2010-11-21 10:31 UTC, Petr Tomasek
ZWJTestLIGA.otf, ZWJTestLIGA.sfd, zwj_liga_test.odt (12.05 KB, application/zip)
2012-02-29 08:53 UTC, j_mach_wust
experimental patch (5.46 KB, patch)
2012-03-29 08:42 UTC, Caolán McNamara
a pic (21.98 KB, image/png)
2012-03-29 08:49 UTC, Caolán McNamara
replacement patch without the initial ugliness (4.15 KB, patch)
2012-07-14 13:43 UTC, Caolán McNamara

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Tomasek 2010-11-21 10:29:30 UTC
Created attachment 40458 [details]
Testing OTF font

LibreOffice Writer (perhaps other components too) ignores OTF fonts with ligatures (technically: GSUB ccmp table). This is crucial for supporting complex scripts.

Attached is a sample OTF font and an example ODT file. It should have correctly been displayed:

but displays:

Technically the font/file do test a) a simple GSUB ligature, b) a ligature with ZWJ (U+200D) unicode char.
Comment 1 Petr Tomasek 2010-11-21 10:30:41 UTC
Created attachment 40459 [details]
Test file
Comment 2 Petr Tomasek 2010-11-21 10:31:27 UTC
Created attachment 40460 [details]
Testing font source file
Comment 3 Don't use this account, use tml@iki.fi 2010-11-22 03:06:50 UTC
Retitling and correcting component, nothing Basic-related here as far as I can see.

Petr, please fill in the platform fields. Does the same happen also in Beta 3?
Comment 4 RGB 2010-12-12 15:47:50 UTC
AFAIK, OOo/LibO only support complex scripts through Graphite font technology: opentype fonts are only displayed/printed, but none of the substitution tables are used (when exporting to pdf, they are included as "type 1" fonts...).
I think it also apply to LibO...
Graphite fonts like this one
work really well, but I agree that complete opentype support is something really important.
Comment 5 Björn Michaelsen 2011-12-23 11:33:10 UTC
[This is an automated message.]
This bug was filed before the changes to Bugzilla on 2011-10-16. Thus it
started right out as NEW without ever being explicitly confirmed. The bug is
changed to state NEEDINFO for this reason. To move this bug from NEEDINFO back
to NEW please check if the bug still persists with the 3.5.0 beta1 or beta2 prereleases.
Details on how to test the 3.5.0 beta1 can be found at:

more detail on this bulk operation: http://nabble.documentfoundation.org/RFC-Operation-Spamzilla-tp3607474p3607474.html
Comment 6 sasha.libreoffice 2012-01-04 01:32:10 UTC
reproduced on LibO 3.5.0 beta 1 on Fedora 64 bit
but my be it is a Feature Request report?
Comment 7 s.mersi 2012-01-31 06:02:32 UTC
Well, I think it is a feature request, too. I confirm the feature is missing on LibreOffice 3.4.5 OOO340m1 (Build:502)

It would be very important in my view: more and more fonts are making full use of the ligature feature of OTF.
Comment 8 j_mach_wust 2012-02-29 08:53:27 UTC
Created attachment 57819 [details]
ZWJTestLIGA.otf, ZWJTestLIGA.sfd, zwj_liga_test.odt

A ZIP file with modifications of Petr Tomasek's original attachments, but with 'liga' and 'rlig' features instead of 'ccmp'.
Comment 9 j_mach_wust 2012-02-29 09:03:49 UTC
I have created new versions of Petr Tomasek's original test files, but with the 'liga' and 'rlig' features instead of the 'ccmp' feature.

The results are somewhat puzzling:

* LO 3.5.0rc3 on Windows will display correctly both Petr Tomasek's original 'ccmp' feature and my new 'liga' and 'rlig' features. However, it will NOT display the ligatures of the Gabriola font which is kinda Windows 7's OpenType features showcase font. Note that Gabriola uses 'liga' ligatures as well. ...

* LO 3.5.0rc3 on Mac OS X will display correctly my new 'liga' and 'rlig' features, but NOT Petr Tomasek's original 'ccmp' features. However, it will display the ligatures of Gabriola.

* LO 3.5.0rc3 on Ubuntu Linux will not display any ligatures at all, not 'liga', 'rlig', 'ccmp' or Gabriola's.

Unfortunately, this is very inconsistent.
Comment 10 sasha.libreoffice 2012-02-29 21:11:27 UTC
Thanks for additional testing. Alas, I have no knowledge in this area. Let ask expert.
@ Caolan
Please, when will have time, look at this bug or request.
Comment 11 Caolán McNamara 2012-03-29 08:42:59 UTC
Created attachment 59228 [details]
experimental patch

here's an experimental patch to...

a) always use the icu layout engine instead of our "simple" regardless of the script
b) not use our custom, and insufficient, ServerFont::GetTable which is *unable* to find the GSUB table :-), hence the fundamental problem
c) bodge the icu layout engine somewhat
Comment 12 Caolán McNamara 2012-03-29 08:49:15 UTC
Created attachment 59229 [details]
a pic
Comment 13 Steve White 2012-04-02 04:50:23 UTC
(reports more general problems, but the causes are the same).
Comment 14 Roman Eisele 2012-05-03 13:04:10 UTC
This is (mainly) a Writer issue, therefore changed 'Component' accordingly.
Comment 15 Caolán McNamara 2012-06-28 13:36:00 UTC
Comment on attachment 59228 [details]
experimental patch

just a demo patch, so mark it as "obsolete" in the sense that its not to be committed
Comment 16 Not Assigned 2012-07-14 13:12:00 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":


Related: fdo#31821 pull tables from otf fonts as well
Comment 17 Caolán McNamara 2012-07-14 13:43:13 UTC
Created attachment 64205 [details]
replacement patch without the initial ugliness
Comment 18 Not Assigned 2012-07-14 17:41:30 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":


Related: fdo#31821 prefer non-latn over latn, but latn over nothing
Comment 19 Caolán McNamara 2012-07-15 07:30:38 UTC
original example works in master now under Linux, other platform's milage may differ
Comment 20 Not Assigned 2012-07-15 07:37:19 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":


Resolves: fdo#31821 use icu layout whenever possible
Comment 21 Not Assigned 2012-07-15 07:37:47 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":


Resolves: fdo#31821 always process ZW[N]J in the font regardless of script
Comment 22 sasha.libreoffice 2012-07-20 10:33:11 UTC
Thanks for fixing this bug
Comment 23 Caolán McNamara 2012-08-07 09:18:45 UTC
*** Bug 47995 has been marked as a duplicate of this bug. ***