Bug 103137 - Incorrectly handled ligatures in Linux Libertine G
Summary: Incorrectly handled ligatures in Linux Libertine G
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.2.8.2 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on: HarfBuzz
Blocks:
  Show dependency treegraph
 
Reported: 2016-10-11 22:07 UTC by Vera
Modified: 2017-04-14 03:04 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Test document for ligature handling (11.11 KB, application/vnd.oasis.opendocument.text)
2016-10-11 22:10 UTC, Vera
Details
hyphenation test document with LibreOffice 5.2.2.2 (11.45 KB, application/vnd.oasis.opendocument.text)
2016-10-15 16:46 UTC, Vera
Details
manual hyphenation test document with LibreOffice 5.2.2.2 (11.48 KB, application/vnd.oasis.opendocument.text)
2016-10-15 16:47 UTC, Vera
Details
Bold ligatures test document (10.48 KB, application/vnd.oasis.opendocument.text)
2016-10-22 15:01 UTC, Vera
Details
Hyphenation in LO 5.3.0.0 (13.19 KB, application/vnd.oasis.opendocument.text)
2016-11-06 23:39 UTC, Vera
Details
Hyphenation in LO 5.3.0.0 v2 (13.21 KB, application/vnd.oasis.opendocument.text)
2016-11-08 20:21 UTC, Vera
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vera 2016-10-11 22:07:26 UTC
Description:
The LibreOffice cannot correctly handle ligatures in font Linux Libertine G. I found three bugs. Since it seems they belong together I didn't create separate bug reports.

I tried with:
LibreOffice versions: 4.2.8.2, 5.0.5.2, 5.1.2.2, 5.1.4.2, 5.1.5.2 and 5.2.2.2
Linux Libertine G version: 5.1.3
OS: Ubuntu 14.04, Ubuntu 16.04, Xubuntu 16.04, Windows 7, Windows 10

issue #1: The hyphenation of ligatures is not correct.
(For example the result is ff- instead of f-f.)

issue #2: If a word ends with ligature and this word is the last in a line, there is a space at the end of the line.

issue #3: If a word ends with ligature I shall select the word with the next space to copy the whole word. If I just select the word, the last character of the ligature does not appear after paste.
(For example if I select and copy "diff", there will be "dif" after paste, if I select and copy "diff ", there will be "diff" after paste.)

Steps to Reproduce:
1. Enable hyphenation
2. Use Linux Libertine G

Actual Results:  
In the case of issue #1: The ligature is appear in front of the hyphen.
In the case of issue #2: There is a space at the end of the line.
In the case of issue #3: The ligature at the end of word is not copied, just the first character of it.

Expected Results:
In the case of issue #1: The ligature should be divided in the case of hyphenation.
In the case of issue #2: No space should be appeared at the end of the line.
In the case of issue #3: The whole ligature should be copied.


Reproducible: Always

User Profile Reset: I tried to reset my profile but it was useless.
The problem also occurs in the case of fresh install.

Additional Info:
LibreOffice 4.2.8.2 is only affected by issue #1.
LibreOffice 5.0.5.2 is only affected by issue #3.


User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0
Comment 1 Vera 2016-10-11 22:10:41 UTC
Created attachment 127957 [details]
Test document for ligature handling

I attached a test document with incorrect hyphenation and space at the end of the line.

In this document I have issue #3 too when I try to copy a word ends with ligature.
Comment 2 tommy27 2016-10-13 04:04:45 UTC
thanks for your bug report.
please take a look at bug 52540 and tell if this a different problem or a duplicate.

moreover please retest with latest 5.2.1.2 release and tell exactly which are the residual issues.

problems limited to 4.2.x and 5.0.x branches are of little interest right now since there are end-of-life version with no more support and development.
Comment 3 Vera 2016-10-13 15:05:17 UTC
Hi,

I found bug 52540 earlier. I wrote a comment (bug 52540, comment 32) but I didn't receive answer.

According to Font features of Linux Libertine G (http://numbertext.org/linux/fontfeatures.pdf) ligc feature is default in my language (Hungarian), so these two bugs can be duplicated. But I found other issues in connection with Linux Libertine G which the other reporter didn't mention, so I think they are just related.

I retested the newest LibreOffice versions. LibreOffice 5.2.2.2 (fresh) and 5.1.5 (still) are affected by all three issues (hyphenation, trailing space, copy).
Comment 4 Aron Budea 2016-10-15 04:43:33 UTC
Issues #2 and #3 are the same, and duplicates of bug 96624.

I'm not entirely sure about issue #1. It's true that the document is buggy on open with v5.2.2.2 (looks fine when opened in v5.0.0.5), but if I run hyphenation on it, it gets correctly hyphenated. Same with an empty document.

So, question is, which version was the test document created with, and can a similarly buggy document be created with v5.2.2.2?
Comment 5 Vera 2016-10-15 16:44:19 UTC
The test document was created with LibreOffice 5.1.4.2.

If I use manual hyphenation via Tools > Language > Hyphenation... tt, ff, fb and fl ligatures have good hyphenation but fi doesn't.

Why do manual and automatic hyphenation have different result? In the test document it's automatic hyphenation via Styles > Modify > Text Flow > Hyphenation: Automatically and the result differs from manual hyphenation.

I created another test document with LibreOffice version 5.2.2.2 with the same results:
1) automatic hyphenation via style is wrong
2) manual hyphenation is good except for ligature fi
3) issues #2 and #3 are still there
Comment 6 Vera 2016-10-15 16:46:18 UTC
Created attachment 128022 [details]
hyphenation test document with LibreOffice 5.2.2.2

I attached a hyphenation test document created with LibreOffice 5.2.2.2.
Comment 7 Vera 2016-10-15 16:47:57 UTC
Created attachment 128023 [details]
manual hyphenation test document with LibreOffice 5.2.2.2

I attached a manual hyphenation test document created with LibreOffice 5.2.2.2.
Comment 8 Vera 2016-10-22 15:01:57 UTC
Created attachment 128158 [details]
Bold ligatures test document

I found another bug with Linux Libertine G.

If I try to make bold a base word in affixed word I cannot to that. I just can make bold the base word with the ligature came from the affixation.

For example the base word is "széf", the affixed word is "széffel" and has a ligature (ff). I cannot make bold the "széf" characters in the word "széffel" because of the ff ligature. I just can make bold "széff"...

And there is a strange thing about that issue if the ligature is tt.
Shall be the base word is "kapcsolat" and the affixed word is "kapcsolattal". If I make bold the "kapcsolatt" in the word "kapcsolattal" the result is "kapcsolatal", where "kapcsolat" is bold and there is a missing second t letter.

I attached a sample document.


Linux Libertine G could be a great, well-featured font but now it's almost unusable because of these annoying issues. Should I look for new graphite font or there will be fix for these bugs in the near future?
Comment 9 Vera 2016-11-03 23:49:25 UTC
Hi,

The issues are still persist:

Version: 5.3.0.0.alpha1+
Build ID: c8be45889217c555e4bec92af838d0524ceba4e0
CPU Threads: 8; OS Version: Linux 4.4; UI Render: default; VCL: gtk2; Layout Engine: old; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2016-11-02_23:37:13
Locale: hu-HU (hu_HU.UTF-8); Calc: group

Is there any progress?
Comment 10 lacyc3 2016-11-03 23:55:40 UTC
I can confirm that LibreOffice 5.2.2.2 (on Ubuntu 16.10) affected.
Comment 11 Aron Budea 2016-11-06 22:21:03 UTC
Thanks for the additional samples. I'm not sure if the bold+ligatures issue is the same, or a different one.

However, I tested with a recent daily build that has the new unified layout engine enabled by default, and both the hyphenation (issue #1) and the combination of bold+ligatures appear fixed (issues #2&#3 aren't).

Please download a current daily build, and test with that.

Version: 5.3.0.0.alpha1+
Build ID: a6ce5d391476e4b6a2cb2d92ff45548c1d75684b
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; Layout Engine: new; 
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2016-11-04_00:03:22
Locale: hu-HU (hu_HU); Calc: CL
Comment 12 ⁨خالد حسني⁩ 2016-11-06 22:47:48 UTC
These are really a bunch of different bugs, so this issue should be closed and each reported separately (unless they are all fixed).
Comment 13 Aron Budea 2016-11-06 22:55:27 UTC
Khaled, it's really only issue #1 in description. The one with the bold+ligature mentioned in comment 8 could be related (though might as well be reported separately to be sure). Issues #2-3 in description are duplicates of bug 96624.

Vera, btw, if you give the daily build a try, copy the content of 'share/extensions/dict-hu' over from the alpha, because daily builds only contain English dictionaries.
Comment 14 Vera 2016-11-06 23:39:35 UTC
Created attachment 128536 [details]
Hyphenation in LO 5.3.0.0

Hi,

I retested with the latest daily build. There is some improvement with the hyphenation but it is still buggy. I attached a test document.

The bold+ligature issue is fixed.

Should I report issues #1, #2 and #3 separately?

Version: 5.3.0.0.alpha1+
Build ID: 4ea62fe8a1194bca3bee5048832456c3559dcb8e
CPU Threads: 8; OS Version: Linux 4.4; UI Render: default; VCL: gtk2; Layout Engine: new; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2016-11-05_23:34:22
Locale: hu-HU (hu_HU.UTF-8); Calc: group
Comment 15 Aron Budea 2016-11-07 18:21:21 UTC
Thanks for checking. Let's see if I understand the buggy document right.
Currently there's nothing wrong with the hyphenation, but if you add further "x"-es in front of the lines, it'll never break as "maf- / fiával" and "röf- / fenés".
Not sure what's wrong with the last one, as that one can break at "elhallgat- / tam".

Issues #2 and #3 share the same cause, and are duplicates of bug 96624. Please don't open a new report for them.
Comment 16 Vera 2016-11-07 22:40:33 UTC
Hi,

The word "maffiával" is hyphenated in form maffiá-val instead of maf-fi-á-val, which is wrong according to the rules of Hungarian orthography.
The word "röffenés" is hyphenated in form röffe-nés instead of röf-fe-nés, which is wrong too.

The word "elhallgattam" has good hyphenation. Sorry for the mistake.
Comment 17 Vera 2016-11-08 20:21:36 UTC
Created attachment 128589 [details]
Hyphenation in LO 5.3.0.0 v2

Instead of word "elhallgattam" which was incorrectly marked as wrong I added a new word "figyelnek". Its hyphenation shall be "fi-gyel-nek" but it is "fig-yelnek".
Comment 18 Vera 2016-11-08 20:25:34 UTC
(In reply to Vera from comment #17)
> Created attachment 128589 [details]
> Hyphenation in LO 5.3.0.0 v2
> 
> Instead of word "elhallgattam" which was incorrectly marked as wrong I added
> a new word "figyelnek". Its hyphenation shall be "fi-gyel-nek" but it is
> "fig-yelnek".

The word "figyelnek" has good hyphenation in LibreOffice 5.3 but not in 5.2.3.2. Sorry for the misleading document name.
Comment 19 Vera 2017-03-26 22:21:56 UTC
Hi,

It seems that LibreOffice 5.3.1.2 solved hyphenation issue.
Comment 20 ⁨خالد حسني⁩ 2017-03-27 07:18:02 UTC
And this shows why reporting different issues in the same bug report is bad. IMO this issue should be closed and any remaining issues should be reported separately.
Comment 21 Aron Budea 2017-04-14 03:04:02 UTC
Let's treat this as a bug report for issue #1, and close it as WORKSFORME, as it's fixed in LO 5.3.

Vera, please check if the other mentioned issues fit bug 96624's description, and if not, open a new one.