Bug 53245 - Bad Graphite ligature handling
Summary: Bad Graphite ligature handling
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
(earliest affected) release
Hardware: Other All
: medium normal
Assignee: martin_hosken
Keywords: regression
Depends on:
Reported: 2012-08-08 13:35 UTC by László Németh
Modified: 2016-08-07 16:19 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:

Test file (its text displayed as "Thhittt" in LibO 3.6, and "Thitt" in LibO 3.4.2 (8.83 KB, application/vnd.oasis.opendocument.text)
2012-08-08 13:35 UTC, László Németh

Note You need to log in before you can comment on or make changes to this bug.
Description László Németh 2012-08-08 13:35:14 UTC
Created attachment 65286 [details]
Test file (its text displayed as "Thhittt" in LibO 3.6, and "Thitt" in LibO 3.4.2

The attached file contains the text "Thitt" formatted by the Graphite font Linux Libertine G, but displayed as "Thhittt" in Writer 3.6. It seems, it is a regression in the Graphite ligature handling, because "Thitt" has been displayed by LibO 3.4.2 correctly.

Examining the content.xml, there are some character formatting boundaries here, with explicit style definitions:

<text:p text:style-name="P1"><text:span text:style-name="T1">T</text:span>hit<text:span text:style-name="T1">t</text:span></text:p></text:p>

Testing (part of the original bug report from Kim Bastin:

"Running LibreOffice 3.6.0 rc4 under WinXP SP3, with fonts Linux Libertine G and Linux Biolinum G, I see the following problem affecting ligatures:

In Writer, type


Save the file (this is essential)! Place cursor before h and type T. I get


(Note Th is a ligature.)

Type hat again, save file, place cursor before t and type f. I get


(Note ft is a ligature.)



Save, then place cursor before f and type f.


(!!). (ffi and fi are ligatures.)

The bug only occurs with characters that were typed before the file was last saved.

The extra characters are not ‘real’: if you delete one h in Thhat, both h’s disappear. So it’s a display bug, but a persistent one: if you close the file, close Writer, relaunch Writer and open the file again, the ‘ghost’ letters still appear."
Comment 1 László Németh 2012-08-08 13:38:39 UTC
Confirmed by me on Linux/LibreOffice (original bug reporter: Kim Bastin).
Comment 2 László Németh 2012-08-09 08:03:12 UTC
There is no problem with LibO, yet.
Comment 3 Kim Bastin 2012-08-25 04:54:01 UTC
Still in LibO
Comment 4 Kim Bastin 2012-09-16 10:34:00 UTC
Still in LibO 3.6.2 rc1
Comment 5 Kim Bastin 2012-09-27 12:11:43 UTC
And in LO
Comment 6 Kim Bastin 2012-11-02 01:45:12 UTC
Still broken in LO 3.6.3.
Comment 7 martin_hosken 2012-11-02 04:01:54 UTC
You are welcome to keep the tap dripping, but the plumber is not going to magically turn up and fix this for a while. I would suggest you try the tap again for Libo 3.8, but even then I make no guarantees.

Please be aware that you do have a simple workaround. Also the whole problem is the character formatting boundaries. This is a relatively rare problem with a simple workaround. If you have a real use case issue rather than 'hey I found something funky', then please add it to this bug.
Comment 8 László Németh 2012-11-03 19:13:11 UTC
Especially the likely not independent bug 52540 is a serious regression in Graphite support, but this is also an annoying problem, also in simple text editing (without document saving). Thanks for your feedbacks.
Comment 9 Urmas 2012-11-23 04:57:04 UTC
It is not a 'rare' problem. Do you know how much efforts it take to clean out all these dummy styles?

*** This bug has been marked as a duplicate of bug 52028 ***
Comment 10 Kim Bastin 2012-11-23 07:59:45 UTC
Nothing in the description of bug 52028 matches the behaviour of the present bug.
Comment 11 Urmas 2012-12-03 09:12:50 UTC
The most common source of ligatures in modern texts are combining diacritic in "good" fonts. So it would be nice to have someone actually investigate this trivial bug.
Comment 12 martin_hosken 2012-12-03 09:42:17 UTC
I just downloaded this test file with libo as distributed with Ubuntu Precise, opened it. It rendered as Thitt, complete with a ligature. I saved as .fodt and the double span had gone away. So is there still a bug? I concur that this is a side effect of bug 52028. All the other tests in the bug description also worked just fine.
Comment 13 Kim Bastin 2012-12-03 10:29:06 UTC
I can’t comment on LO in Ubuntu. The bug is still there in LO under Windows XP. Saving as .fodt is not an option in this version, so I can’t comment on that either.
Comment 14 László Németh 2013-04-12 09:25:28 UTC
Checked in 4.0.2: this regression results bad character or ligature duplication (both in ODF, and PDF export). In my test, not only the previously saved, but all text could have problem with a simple text modification.

Workaround: delete and rewrite the text with the problem, or select it, and clear direct formatting by Ctrl-M.

The workaround doesn't work for the similar problem at automatic hyphenation (Bug 52540)
Comment 15 László Németh 2013-05-22 08:18:16 UTC
The serious text modification has been fixed, see Bug 52540, but for the missing ligatures need a new issue.