Bug 133276 - Wrong characters formatting (kerning) after odt file opened in LO Writer > 5.3 release (harfbuzz)
Summary: Wrong characters formatting (kerning) after odt file opened in LO Writer > 5....
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.3.0.3 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Font-Rendering Regressions-HarfBuzz
  Show dependency treegraph
 
Reported: 2020-05-22 14:25 UTC by Piotr
Modified: 2022-08-11 18:28 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
The difference between the versions. (86.35 KB, image/jpeg)
2020-05-22 14:31 UTC, Piotr
Details
Example file with too long line (21.12 KB, application/vnd.oasis.opendocument.text)
2020-05-27 14:00 UTC, Piotr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr 2020-05-22 14:25:35 UTC
Description:
The formatted text (italic) in odt file, kept the exact same formatting in the versions LO 3x, 4x, 5x, also in OO 3x and 4x.
After the update to LO 6.4.3.2 the same file opened has a drastically changed formatting of one line in italic. All changes the structure of the document. No visible/known changes in the formatting, same parameters.

Steps to Reproduce:
1. Type a full length line in LO Writer 4.x or 5.1.1.3, using Palatino Linotype font type;
2. Change it to italic,
3. Save,
4. Open in the newest LO 6.4.3.2 Writer

Actual Results:
The same line is much longer in 6.4.3.2 Writer.
Effect is that a carefully designed booklets change the layout, formatting, and so on.

Expected Results:
There should be no difference in line length, as it has been for years.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Keep the same way of displaying and rendering the fonts as it dit for years.
Comment 1 Piotr 2020-05-22 14:31:29 UTC
Created attachment 161147 [details]
The difference between the versions.
Comment 2 V Stuart Foote 2020-05-22 15:37:29 UTC
There are subtle differences in how the operating system and window manager will render text--e.g. handling the font metrics for font height and leading, likewise font ligatures and OTF/Graphite smart font features. Could have some impact here.

But start with a direct examination of the document. You can do it with a "Zip" utility--an ODF archive is just a .zip file; but you'd have to spend a little more time figuring out the folder structure and configuration.

Work against a copy of the original, and from LO 6.4.4 or 7.0.0 'save as' Flat ODF. That will allow you to conveniently examine the various formatting in the document with a text editor like NotePad++ or similar.

Likewise you can install in parallel [1] one of the older LO release builds [2]. With that accomplished, again open a copy of the original in that build--and save as Flat ODF.

You can then examine the text spans and ODF structure side-by-side for any differences in formatting or styles that may be affecting layout in current builds of LibreOffice

Good luck and let us know what you find, or if you need more assistance.

=-ref-=
[1] https://wiki.documentfoundation.org/Installing_in_parallel
[2] http://downloadarchive.documentfoundation.org/libreoffice/old/
Comment 3 Piotr 2020-05-22 16:57:29 UTC
Thanks a lot Stuart.
I know about .zip files, use this feature on daily basis, easier to copy styles or changing colors in files.

Will let you know what N++ says :)

Regarding system/rendering. So far, if it is open in older version, 5x or so, works fine.
Also, if it is open in OpenOffice Writer, 4.1.7, also fine on Win 10 and 8.1.
Therefore, the only changing factor is the software itself, not system rendering, graphic card and so on.
Hence, this part you can consider clear: the system/hardware does not influence this change. It is sofware rendering, I believe. If so, there should be an official warning then:
"As of XXX version you can loose some of your formatting" or so.
Cheers,
Piotr
Comment 4 Telesto 2020-05-22 20:07:26 UTC
A sample file would be nice :-). The default font rendering changed with LibreOffice 5.3. So if 5.2 is good and 5.3 is 'bad' ..
Comment 5 Piotr 2020-05-23 12:32:04 UTC
(In reply to Telesto from comment #4)
> A sample file would be nice :-). The default font rendering changed with
> LibreOffice 5.3. So if 5.2 is good and 5.3 is 'bad' ..

Telesto, thanks!
This might be the clue, I use on Vmware Win XP with 5.1.1.3 for printing (HP drivers issue :)
will check it out on 5.3 then.
Comment 6 QA Administrators 2020-05-24 03:44:35 UTC Comment hidden (obsolete)
Comment 7 Dieter 2020-05-27 07:16:35 UTC
(In reply to Telesto from comment #4)
> A sample file would be nice :-)

=> NEEDINFO
Comment 8 Piotr 2020-05-27 14:00:00 UTC
Created attachment 161337 [details]
Example file with too long line

I kept the cover, as this is style "first page", so I did not change the structure of the document.
See on page 1, the line starting with "Prices...", for years it's been in one line.
It is also visible on page 3, same line, it's different point of the offer.

So we have around 17 such pages which now have one line more in due to "new rendering".
Comment 9 Dieter 2020-05-27 19:10:35 UTC
I've opened you file in LO 7.0.0.0alpha1 and also in LO 5.4.7.2, but couldn't see a difference.
Comment 10 Piotr 2020-05-28 08:00:52 UTC
(In reply to Dieter from comment #9)
> I've opened you file in LO 7.0.0.0alpha1 and also in LO 5.4.7.2, but
> couldn't see a difference.

Thanks.
LO 5.3 - absolute disaster with font rendering compared to <5.2, not only this one case with Palatino Linotype italic, but also with Trajan Pro and other fonts.
This might be the result of the change in font rendering issue since 5.3, as mentioned above by Telesto. Therefore, 5.4 would keep this new rendering.

LO 7.0, I am curious - was the line "Prices..." taking two lines? Or was it in one line?
The latter would be great.
Comment 11 Dieter 2020-05-28 08:12:46 UTC
(In reply to Piotr from comment #10)
> LO 7.0, I am curious - was the line "Prices..." taking two lines? Or was it
> in one line?
> The latter would be great.

No, also two lines. From your initial bug report I thought, 5x is fine, but didn't see that only 5.1 has been good. Sorry.
Comment 12 Piotr 2020-05-28 08:39:11 UTC
(In reply to Dieter from comment #11)
> (In reply to Piotr from comment #10)
> > LO 7.0, I am curious - was the line "Prices..." taking two lines? Or was it
> > in one line?
> > The latter would be great.
> 
> No, also two lines. From your initial bug report I thought, 5x is fine, but
> didn't see that only 5.1 has been good. Sorry.

Thanks, Dieter, that sets me somehow, as I know what to implement.
Comment 13 QA Administrators 2020-05-29 03:33:52 UTC Comment hidden (obsolete)
Comment 14 Piotr 2020-06-02 07:41:24 UTC
Here is another hint, and the bug, actually:

this "new" rendering, since 5.3 is somehow badly calibrated.
Proof:

take the example .odt file here, mark all the line "Prices..." > Character > Position > set Kerning to -0.1 pt (the lowest possible).

The whole line shrinks around 17%. From a DTP point of view this is absolutely a disaster, if 0.1 pt kerning affects the line that much. Never seen something like this, and I worked on Ventura, PageMaker, Word Perfect and mostly, on OO and LO Writer.

My guess is, these are the programmers who are working on LO, glory to them, but the software is used by people like me, from DTP. And the programmers naturally cannot know how DTP should work.

So this is the whole thing with rendering too much or whatever, I am not a programmer. :)
Comment 15 V Stuart Foote 2020-06-02 13:01:36 UTC
OK, an issue against Harfbuzz but I think where we left things is that can't do much more until bug 103322 is solved.
Comment 16 ⁨خالد حسني⁩ 2020-06-03 12:10:45 UTC
LibreOffice now uses unhinted glyph advances instead of hinted ones. Unhinted glyph advances are stable and don’t change based on OS or hinting settings, so that line breaks are stable. Current behavior should match MS Office (ligatures might need to be enabled in MS Office or disable is LO to get the exact same line breaks, since the default differs in both).

The bad inter-charcter spacing is related to bug 103322, but orthogonal to the line breaking. Fixing bug 103322 will not change the line breaks.
Comment 17 Dieter 2020-12-08 16:37:04 UTC
Stuart, Khaled, I'm not as familiar with kerning than you. So reading comment 15 and comment 16, it's not clear to me, if you can confirm the bug or what remains to confirm it. Could you please explain?
Comment 18 V Stuart Foote 2020-12-08 18:04:58 UTC
(In reply to Dieter from comment #17)
> Stuart, Khaled, I'm not as familiar with kerning than you. So reading
> comment 15 and comment 16, it's not clear to me, if you can confirm the bug
> or what remains to confirm it. Could you please explain?

Actually don't think it is a kerning/hinting issue.

At 5.3 with Khaled's harfbuzz work we picked up OpenType smart font features on the Graphite framework.

So, for this rather horribly formatted source/sample document, moving the direct formatting into a paragraph style for the "Prices valid until..." (i.e. a new style Prices_italic against Text Body -> Prices) with Palatino Linotype italic font. Activating the Character feature "Historical ligatures", with ":hlig" tag, is sufficient to bring the text run onto a single line -- recovering spacing by ligature of the 'st' of 31st, and 'ff' of coffee.
Comment 19 Buovjaga 2021-08-31 15:28:37 UTC
Is there a reason to keep this open after the previous comment?
Comment 20 QA Administrators 2022-02-28 03:26:27 UTC Comment hidden (obsolete)
Comment 21 QA Administrators 2022-03-31 03:34:30 UTC
Dear Piotr,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INSUFFICIENTDATA due to inactivity and
a lack of information which is needed in order to accurately
reproduce and confirm the problem. We encourage you to retest
your bug against the latest release. If the issue is still
present in the latest stable release, we need the following
information (please ignore any that you've already provided):

a) Provide details of your system including your operating
   system and the latest version of LibreOffice that you have
   confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED
and we will attempt to reproduce the issue. Please do not:

a) respond via email 

b) update the version field in the bug or any of the other details
   on the top section of our bug tracker

Warm Regards,
QA Team

MassPing-NeedInfo-FollowUp