Bug 70317 - FORMATTING: Awkward kerning of first word in a justified paragraph before an "italicised" text
Summary: FORMATTING: Awkward kerning of first word in a justified paragraph before an ...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
4.1.1.2 release
Hardware: x86-64 (AMD64) macOS (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA target:5.3.0
Keywords: regression
Depends on: HarfBuzz
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-09 12:34 UTC by Alessandro Bruni
Modified: 2016-11-06 18:38 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
An example where the error occurs. (9.48 KB, application/vnd.oasis.opendocument.text)
2013-10-09 12:34 UTC, Alessandro Bruni
Details
Incorrect rendering of the example. (24.29 KB, image/png)
2013-10-09 13:22 UTC, Alessandro Bruni
Details
Kerning error with LibreOffice 4.2.5.2 (45.58 KB, image/png)
2014-07-07 09:16 UTC, Alessandro Bruni
Details
Kerning error with LO 4.3.2 and LO nightly 2014-10-1 (208.11 KB, image/png)
2014-10-01 10:02 UTC, Alessandro Bruni
Details
No kerning error in latest nightly 2016-11-06 (86.03 KB, image/png)
2016-11-06 17:39 UTC, eisa01
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alessandro Bruni 2013-10-09 12:34:29 UTC
Created attachment 87337 [details]
An example where the error occurs.

Problem description: 
If I write a sentence of more than one line, where the first word is short (e.g. two letters) and then follows an italicised block, and the paragraph is justified, the spacing between the letters of the first word is too wide.

Steps to reproduce:
1. Write a paragraph of more than one line, beginning with a short word and possibly long words at the end of the line to intensify the effect of justification.
2. Justify the paragraph and italicise the first few words starting from the second.

Current behavior:
Letters of first word are spaced too widely.

Expected behavior:
Normal spacing like in the rest of the paragraph.

              
Operating System: Mac OS X
Version: 4.1.1.2 release
Comment 1 Alessandro Bruni 2013-10-09 13:22:24 UTC
Created attachment 87339 [details]
Incorrect rendering of the example.
Comment 2 Cor Nouws 2013-10-10 11:21:52 UTC
Hi Alessandro,

thanks for the issue. I do not see the problem (tried with three fonts) on Ubuntu.
Maybe someone else, different OS, has the same problem?

Or could you attach your file?

Cheers,
Cor
Comment 3 Alessandro Bruni 2013-10-10 11:49:59 UTC
Hi Cor,

thanks for the reply. Yes I tried on Ubuntu and the problem doesn't show up.
Probably it's related to this bug, that got fixed:
https://bugs.freedesktop.org/show_bug.cgi?id=66385

And it only shows up on LibreOffice 4.1 so that seems to confirm that they are the same issue.

Best,
Alessandro
Comment 4 ign_christian 2014-07-05 09:31:45 UTC
Hi Alessandro..just a ping since it's been reported months ago. Does it still happen in LO 4.2.5.2 or 4.3.0.2 with OSX machine ?

If resolved please change status to RESOLVED WORKSFORME, unless UNCONFIRMED
Comment 5 Alessandro Bruni 2014-07-07 09:16:12 UTC
Created attachment 102359 [details]
Kerning error with LibreOffice 4.2.5.2
Comment 6 Alessandro Bruni 2014-07-07 09:19:56 UTC
(In reply to comment #4)
> Hi Alessandro..just a ping since it's been reported months ago. Does it
> still happen in LO 4.2.5.2 or 4.3.0.2 with OSX machine ?
> 
> If resolved please change status to RESOLVED WORKSFORME, unless UNCONFIRMED

Hi Christian,
thanks for asking. Unfortunately the bug hasn't been solved yet, as you can see from the screenshot. By the way I can now also confirm it for OpenOffice, which apparently also merged your code, and didn't have the problem at the time I filed the bug report.

Best,
Alessandro
Comment 7 Owen Genat (retired) 2014-09-29 08:35:32 UTC
Tested ODT under GNU/Linux (FreeType v2.4.9-1.1) using:

v3.3.4.1 OOO330m19 Build: 401
v3.4.6.2 OOO340m1 Build: 602
v3.5.7.2 Build ID: 3215f89-f603614-ab984f2-7348103-1225a5b
v3.6.7.2 Build ID: e183d5b
v4.0.6.2 Build ID: 2e2573268451a50806fcd60ae2d9fe01dd0ce24
v4.1.6.2 Build ID: 40ff705089295be5be0aae9b15123f687c05b0a
v4.2.6.3 Build ID: 3fd416d4c6db7d3204c17ce57a1d70f6e531ee21
v4.3.2.2 Build ID: edfb5295ba211bd31ad47d0bad0118690f76407d

I do not see the kerning issue reported. These are the versions of Times New Roman used:

- TTF v3.00 from WinXP
- TTF v5.01.3x from MacOS 10.6.8 

Issue is possibly specific to the MacOS build.
Comment 8 Alessandro Bruni 2014-09-29 08:57:54 UTC
Dear Owen, thanks for checking. I can confirm again the bug on the latest release (v4.3.2.2 Build ID: edfb5295ba211bd31ad47d0bad0118690f76407d) with my Mac OS installation.
I am now running Mac OS X v. 10.9.4, and I agree this is system dependent as I am not experiencing the same bug under Linux, but if I remember well this behaviour started with an update of LibreOffice (OpenOffice did not show the same bug at the time, now it does, so maybe they imported the buggy code).
I can confirm the bug also on an older version of OSX, but probably not as old as 10.6.8 (I don't remember).
Comment 9 Alex Thurgood 2014-09-30 16:59:43 UTC
Confirming, this is OSX specific
Comment 10 Alex Thurgood 2014-09-30 17:07:43 UTC
I see the problem in 

Version: 4.3.2.2
Build ID: edfb5295ba211bd31ad47d0bad0118690f76407d

as well
Comment 11 Alex Thurgood 2014-09-30 17:09:49 UTC
However, the problem isn't present in my master build of LO 440, so it would appear at least to be fixed there.
Comment 12 Alessandro Bruni 2014-10-01 10:02:07 UTC
Created attachment 107172 [details]
Kerning error with LO 4.3.2 and LO nightly 2014-10-1


I don't think the current nightly build is solving the problem although I see that things are moving in the right direction:
As you can see from the attachment I glued together the rendering of the offending file in LO 4.3.2 and the latest nightly build, as well as their PDF outputs.
The latest nightly is at least recognizing that there is an issue with the kerning on OSX, and fixing the problem on the first word, but the rendering of the entire line has now other kerning issues. The "r" in "Ernest" and the "e" in "completely" have very weird kerning.
The PDF output is then totally different and I hope that in the future it will again look like the rendering by LibreOffice.
Comment 13 Alex Thurgood 2014-10-01 13:07:06 UTC
(In reply to comment #12)

> I don't think the current nightly build is solving the problem although I
> see that things are moving in the right direction:
> As you can see from the attachment I glued together the rendering of the
> offending file in LO 4.3.2 and the latest nightly build, as well as their
> PDF outputs.
> The latest nightly is at least recognizing that there is an issue with the
> kerning on OSX, and fixing the problem on the first word, but the rendering
> of the entire line has now other kerning issues. The "r" in "Ernest" and the
> "e" in "completely" have very weird kerning.
> The PDF output is then totally different and I hope that in the future it
> will again look like the rendering by LibreOffice.

Agreed. I had only looked at the beginning, as this was the initial bug you raised. The PDF export is yet another problem IMHO, for which you should open a separate report.
Comment 14 QA Administrators 2015-10-14 19:57:27 UTC Comment hidden (obsolete)
Comment 15 Alessandro Bruni 2015-10-14 21:04:18 UTC
The bug is still present in LibreOffice 5.0.2.2/MacOS, and I have put the keyword regression since the bug was not present with LO 3.3.
Comment 16 Xisco Faulí 2016-09-13 08:33:12 UTC
Adding keyword 'bibisectRequest'.
This regression can be bibisected with http://dev-downloads.libreoffice.org/bibisect/mac/Bibisect_MacOSX10.6%2b_lo-4.1_to_lo-4.2.tar.bz2
Comment 17 eisa01 2016-11-06 17:39:01 UTC
Created attachment 128529 [details]
No kerning error in latest nightly 2016-11-06
Comment 18 eisa01 2016-11-06 17:41:43 UTC
This is fixed by the new layout engine in bug 89870, see screenshot. Kerning in other parts of the text also look fine, not like comment 12

Resolving as fixed

Version: 5.3.0.0.alpha1+
Build ID: 17e9dc436bc6ad8d3a5bbde15d4d47262650aa2c
CPU Threads: 2; OS Version: Mac OS X 10.12; UI Render: default; Layout Engine: new; 
TinderBox: MacOSX-x86_64@49-TDF, Branch:master, Time: 2016-11-06_01:25:01
Locale: en-US (en_NO.UTF-8); Calc: group