Bug 66916 - Writer doesn't show ligatures of some fonts
Summary: Writer doesn't show ligatures of some fonts
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
4.0.2.2 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:5.3.0
Keywords:
: 98733 (view as bug list)
Depends on: HarfBuzz
Blocks: Font-Rendering
  Show dependency treegraph
 
Reported: 2013-07-15 09:27 UTC by Alessandro Ceschini
Modified: 2016-11-06 18:38 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Ligatures in LO (11.98 KB, application/vnd.oasis.opendocument.text)
2013-07-15 09:27 UTC, Alessandro Ceschini
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alessandro Ceschini 2013-07-15 09:27:51 UTC
Created attachment 82434 [details]
Ligatures in LO

Hello everybody,

I'm running LO 4.0.2.2 and the only fonts that show ligatures "fi", "ff", "fl", "ffl", "ffi" are:

- Linux Libertine G
- Old Standard TT

Fonts which display ligatures under XeLaTeX but don't do so on LO are:

- Free Serif
- DejaVu Serif
- Linux Libertine O
- Minion Pro

See attachment

Why this erratic behaviour?
Comment 1 Adolfo Jayme Barrientos 2013-07-16 13:44:38 UTC
Writer currenly supports only Graphite fonts for automatic ligatures. It should support OpenType ligatures, which are far more used.
Comment 2 ⁨خالد حسني⁩ 2013-07-17 01:30:04 UTC
OpenType ligatures for Latin and other simple scripts should work on Linux starting with 4.1, and they already work on Mac. Ligatures for complex scripts should work on all platforms already.
Comment 3 Owen Genat (retired) 2014-08-18 10:06:27 UTC
(In reply to comment #0)
> Fonts which display ligatures under XeLaTeX but don't do so on LO are:
> 
> - Free Serif
> - DejaVu Serif
> - Linux Libertine O
> - Minion Pro

Under v4.2.6.2 Build ID: 185f2ce4dcc34af9bd97dec29e6d42c39557298f all these fonts display ligature substitution as expected. Same under v4.4.0.0.alpha0+ Build ID: aa0e3701aad1a8a955773e869d9a6b59eac51e72 TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2014-08-10_07:00:01. 

Alessandro can you re-check using a more recent version? Status set to NEEDINFO. Please set back to NEW (or RESOLVED as required) once the request information is provided.
Comment 4 Adolfo Jayme Barrientos 2014-08-19 01:54:04 UTC
The bug remains under Windows only, as Khaled says this works both under Mac and Linux.
Comment 5 Volga 2015-01-30 19:41:15 UTC
I think integrating XeTeX/XeLaTeX typesetting engine to handle these features can found the way to solve the bug.
Comment 6 ⁨خالد حسني⁩ 2015-01-31 00:09:47 UTC
(In reply to General Kutuzov from comment #5)
> I think integrating XeTeX/XeLaTeX typesetting engine to handle these
> features can found the way to solve the bug.

We already use the same layout engine used by XeTeX (HarfBuzz) on Linux.
Comment 7 JC Ahangama 2015-03-23 20:11:37 UTC
(In reply to Khaled Hosny from comment #6)
> (In reply to General Kutuzov from comment #5)
> > I think integrating XeTeX/XeLaTeX typesetting engine to handle these
> > features can found the way to solve the bug.
> 
> We already use the same layout engine used by XeTeX (HarfBuzz) on Linux.

Your statement that ligatures of simple scripts work fine in OSX and Linux is true. I have a feeling though that Windows treats only the set of English ligatures as ligatures of the Simple Script, perhaps continuing the stop-gap measure used until font makers understood OpenType PUA (Private User Area) and look-up tables. The English ligatures were assigned the first few codepoints of PUA. 

Very soon, Unicode refused to assign any more codepoints for specific ligatures of languages, telling them to follow OT standard. Open Type (now Open Font) standard allows font foundries to place ligatures in the PUA and evoke them using look-up tables. There are three kinds of ligatures but Standard (regular) Ligatures are rendered by a program by default.

Windows Notepad, All browsers, Abiword, Mac, Linux, LO Write in Linux, Excel, Gnumeric show standard ligatures correctly. 

Uniquely, MS Word and LO Write do it randomly and intersperse spaces everywhere and forget to make some ligatures as well. IE was like this until the latest version, but now fixed.
Comment 8 Volga 2015-03-30 10:06:38 UTC
(In reply to Khaled Hosny from comment #6)
> (In reply to General Kutuzov from comment #5)
> > I think integrating XeTeX/XeLaTeX typesetting engine to handle these
> > features can found the way to solve the bug.
> 
> We already use the same layout engine used by XeTeX (HarfBuzz) on Linux.

So what if using this layout engine for Windows version?
Comment 9 Volga 2015-03-30 10:20:33 UTC
(In reply to JC Ahangama from comment #7)
> (In reply to Khaled Hosny from comment #6)
> > (In reply to General Kutuzov from comment #5)
> > > I think integrating XeTeX/XeLaTeX typesetting engine to handle these
> > > features can found the way to solve the bug.
> > 
> > We already use the same layout engine used by XeTeX (HarfBuzz) on Linux.
> 
> Your statement that ligatures of simple scripts work fine in OSX and Linux
> is true. I have a feeling though that Windows treats only the set of English
> ligatures as ligatures of the Simple Script, perhaps continuing the stop-gap
> measure used until font makers understood OpenType PUA (Private User Area)
> and look-up tables. The English ligatures were assigned the first few
> codepoints of PUA. 
> 
> Very soon, Unicode refused to assign any more codepoints for specific
> ligatures of languages, telling them to follow OT standard. Open Type (now
> Open Font) standard allows font foundries to place ligatures in the PUA and
> evoke them using look-up tables. There are three kinds of ligatures but
> Standard (regular) Ligatures are rendered by a program by default.
> 
> Windows Notepad, All browsers, Abiword, Mac, Linux, LO Write in Linux,
> Excel, Gnumeric show standard ligatures correctly. 
> 
> Uniquely, MS Word and LO Write do it randomly and intersperse spaces
> everywhere and forget to make some ligatures as well. IE was like this until
> the latest version, but now fixed.

Well, BabelPad (from http://babelstone.co.uk/) also show standard ligatures correctly, I have tested this app with Linux Libertine G, Linux Libertine O, Free Serif, DejaVu Serif.
Comment 10 Volga 2015-05-07 12:00:15 UTC
(In reply to Khaled Hosny from comment #6)
> (In reply to General Kutuzov from comment #5)
> > I think integrating XeTeX/XeLaTeX typesetting engine to handle these
> > features can found the way to solve the bug.
> 
> We already use the same layout engine used by XeTeX (HarfBuzz) on Linux.

Well I think some fonts looks badly when layout with Uniscribe, so I think it's better embedding this layout engine into Windows version.
Comment 11 Volga 2015-05-19 15:41:08 UTC
Some food for thought on this topic from LGM 2015: http://www.freesoftwhere.org/2015/05/07/opentype-workshop-lgm-2015/
I think this is good idea if you want to get the way to resolve this bug in LO for Windows.
Comment 12 Volga 2015-05-24 11:09:57 UTC
There is an indication that HarfBuzz will embedded the Graphite2 layout engine, i.e. you can use HarfBuzz to get a way to implement both OT and Graphite font shaping in the future.

https://github.com/behdad/harfbuzz/pull/107
Comment 13 Volga 2015-08-06 16:49:01 UTC
Oh~well, there is still no way to using OpenType feature in LibreOffice 5 for Windows. I tried to get small caps, ligatures and localized forms from FreeSerif and FreeSans, but they seems not appeared.

I got these fonts from here: https://code.launchpad.net/~dns/+recipe/freefont
Comment 14 Volga 2015-08-06 17:01:11 UTC
(In reply to Alessandro Ceschini from comment #0)
> Created attachment 82434 [details]
> Ligatures in LO
> 
> Hello everybody,
> 
> I'm running LO 4.0.2.2 and the only fonts that show ligatures "fi", "ff",
> "fl", "ffl", "ffi" are:
> 
> - Linux Libertine G
> - Old Standard TT
> 
> Fonts which display ligatures under XeLaTeX but don't do so on LO are:
> 
> - Free Serif
> - DejaVu Serif
> - Linux Libertine O
> - Minion Pro
> 
> See attachment
> 
> Why this erratic behaviour?

I got your attachment, opened this file by Firefox (through WebODF addon), I found all these ligatures can be seen with Linux Libertine G, Free Serif, DejaVu Serif, Linux Libertine O.

(In reply to Khaled Hosny from comment #6)
> (In reply to General Kutuzov from comment #5)
> > I think integrating XeTeX/XeLaTeX typesetting engine to handle these
> > features can found the way to solve the bug.
> 
> We already use the same layout engine used by XeTeX (HarfBuzz) on Linux.

I have known that Firefox also use HarfBuzz on both Linux and Windows
Comment 15 Volga 2015-08-07 18:48:17 UTC
Additional note for comment 14:

You can get the WebODF addon from here:
https://addons.mozilla.org/en-US/firefox/addon/webodf/
Comment 16 Volga 2015-08-11 04:06:56 UTC
Well, I have noticed that Inkscape developers have announced that they have implemented the way of accessing OpenType font feature in the developer release at planet.inkscape.org, which depend on corresponding feature of Pango version 1.37.1 and greater. I think you can try to use this engine on Windows to resolve this bug.
Comment 17 tomaskeb 2015-09-30 07:33:00 UTC
In LO 5.0.2, standard ligatures started to work on Windows without being mentioned in any release notes. How is that possible?
Comment 18 Volga 2015-11-07 05:15:29 UTC
(In reply to tomaskeb from comment #17)
> In LO 5.0.2, standard ligatures started to work on Windows without being
> mentioned in any release notes. How is that possible?

I have also tested standard ligatures in LO 5.0.3 for Windows, when I input fi, ff, fl, they works in FreeSerif font, but when I input “FreeSerif:liga=0”, these ligatures are still there. It seems to me that LO for Windows implemented this feature, but LO have no way of turning on or turning off.
Comment 19 Volga 2015-11-09 17:44:45 UTC
(In reply to General Kutuzov from comment #18)
> (In reply to tomaskeb from comment #17)
> > In LO 5.0.2, standard ligatures started to work on Windows without being
> > mentioned in any release notes. How is that possible?
> 
> I have also tested standard ligatures in LO 5.0.3 for Windows, when I input
> fi, ff, fl, they works in FreeSerif font, but when I input
> “FreeSerif:liga=0”, these ligatures are still there. It seems to me that LO
> for Windows implemented this feature, but LO have no way of turning on or
> turning off.

This problem can also be reproduced with Doulos SIL font.
Comment 20 Volga 2016-03-10 19:32:26 UTC
On LO Writer 5.1.1 on Windows 10, OT ligatures seems closed.
Comment 21 dan980 2016-03-23 15:02:31 UTC
(In reply to tomaskeb from comment #17)
> In LO 5.0.2, standard ligatures started to work on Windows without being
> mentioned in any release notes. How is that possible?

In LO 5.1.1, standard ligatures do not work anymore on Windows
Comment 22 tomaskeb 2016-04-10 18:33:06 UTC
(In reply to dan980 from comment #21)
> (In reply to tomaskeb from comment #17)
> > In LO 5.0.2, standard ligatures started to work on Windows without being
> > mentioned in any release notes. How is that possible?
> 
> In LO 5.1.1, standard ligatures do not work anymore on Windows

It is a shame it was removed. There should be a setting to enable/disable the ligatures…
Comment 23 tomaskeb 2016-04-10 18:39:41 UTC
*** Bug 98733 has been marked as a duplicate of this bug. ***
Comment 24 Patrick Schönbach 2016-05-01 15:39:00 UTC
Why was the support for OpenType ligatures and context alternatives dropped again in 5.1 on Windows? It started to work quite well in 5.0!
Comment 25 Patrick Schönbach 2016-05-01 15:41:54 UTC
For me, this is almost a show stopper as I deal with a lot of old German fonts that heavily rely on OpenType features.
Comment 26 Volga 2016-11-02 04:22:18 UTC
It seems work with LibreOfficeDev 5.3, see attachment 128422 [details].