Bug 92502 - FORMATTING: Writer for Linux text height mismatch with Windows
Summary: FORMATTING: Writer for Linux text height mismatch with Windows
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.4.0.3 release
Hardware: All Linux (All)
: high minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Font-Rendering
  Show dependency treegraph
 
Reported: 2015-07-02 14:45 UTC by mozello
Modified: 2023-10-20 09:25 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
ODT_file - font TNR (97.00 KB, application/vnd.oasis.opendocument.text)
2015-07-02 14:45 UTC, mozello
Details
screenshot (61.74 KB, image/png)
2015-07-02 14:47 UTC, mozello
Details
ODT file - font Liberation (96.77 KB, application/vnd.oasis.opendocument.text)
2018-11-07 16:09 UTC, Timur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mozello 2015-07-02 14:45:38 UTC
Created attachment 117000 [details]
ODT_file - font TNR

The problem is text in windows and ubuntu Writer looks and prints different (ubuntu - 1 page, windows - 2 pages). It's very annoying when you work with other people on the same document! 
(windows XP 32bit, ubuntu 14.04 64bit)
I have a comparison screenshot, but don't know how to attach 2 files.
Comment 1 mozello 2015-07-02 14:47:02 UTC
Created attachment 117002 [details]
screenshot
Comment 2 Buovjaga 2015-07-02 17:51:37 UTC
Confirmed!

Severity doesn't seem to be major, though: https://wiki.documentfoundation.org/images/0/06/Prioritizing_Bugs_Flowchart.jpg

Win 7 Pro 64-bit, Version: 4.4.4.3
Build ID: 2c39ebcf046445232b798108aa8a7e7d89552ea8
Locale: fi_FI

Version: 5.1.0.0.alpha1+ (x64)
Build ID: 3a6ec53eeeec71312f5ea890689f9c2ee79c2aac
TinderBox: Win-x86_64@62-TDF, Branch:MASTER, Time: 2015-07-01_02:24:40
Locale: fi-FI (fi_FI)

Ubuntu 15.04 64-bit 
Version: 4.4.4.3
Build ID: 40m0(Build:3)
Locale: en_US.UTF-8

Version: 5.1.0.0.alpha1+
Build ID: 3ecef8cedb215e49237a11607197edc91639bfcd
TinderBox: Linux-rpm_deb-x86_64@46-TDF-dbg, Branch:master, Time: 2015-06-20_00:06:19
Locale: en-US (en_US.UTF-8)
Comment 3 mozello 2015-08-12 19:52:49 UTC Comment hidden (no-value)
Comment 4 mozello 2015-08-28 22:13:32 UTC
OK, I've found that writer 4.4.0.1 on linux was the latest without the bug. From 4.4.0.2 something in linux version is broken.

Writer 5.0.1 - the bug is still there.
Comment 5 Timur 2015-10-05 17:33:03 UTC
Instead of emotions, you are required to give exact steps to reproduce a problem. 
Where was the original document created, Win/Lin, and with which LO version? 
When you say Writer 4.4.0.1 was fine, is it for filesave/creating a file or fileopen/opening a windows created file?
Comment 6 mozello 2015-10-05 20:19:18 UTC
The exact steps are in Description and Comment1. Try to open attached file in windows and Linux. Look at the screenshot in comment1.
I don't know where that document was created (it's just the first pages of a big document). I downloaded the whole document from some web site long long time ago.
We don't create new files, we modify that old document and then save as a copy.
From 4.4.0.2 such documents opened in Linux LO are looking and printing different from windows version and different from previous Linux LO versions.
Comment 7 mozello 2015-12-15 07:29:39 UTC Comment hidden (no-value)
Comment 8 Buovjaga 2016-05-05 16:19:00 UTC Comment hidden (no-value)
Comment 9 mozello 2016-05-07 22:24:45 UTC
Writer 5.1.2.2 (Ubuntu 14.04 64 bit) - the bug is still there.
I also tried writer 5.1.2.2 on Windows Vista 32bit. The result is absolutely the same difference between linux and windows versions as shown in comment1 (screenshot).
So bug is NOT resolved.
Comment 10 Buovjaga 2016-05-08 08:32:05 UTC Comment hidden (no-value)
Comment 11 Buovjaga 2016-12-09 11:59:45 UTC
I am seeing the same result already in LibO 3.3 on Linux. Note: be sure to install Times New Roman on Linux.

Still happening with master as well.

Arch Linux 64-bit, KDE Plasma 5
Version: 5.4.0.0.alpha0+
Build ID: a564821eb9e991774195120e6965b2a8b1419dc5
CPU Threads: 8; OS Version: Linux 4.8; UI Render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on December 9th 2016

Arch Linux 64-bit
LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4
Comment 12 mozello 2016-12-09 18:09:31 UTC Comment hidden (no-value)
Comment 13 Buovjaga 2016-12-09 18:13:50 UTC
(In reply to mozello from comment #12)
> (In reply to Buovjaga from comment #11)
> > I am seeing the same result already in LibO 3.3 on Linux. Note: be sure to
> > install Times New Roman on Linux.
> 
> But in writer 4.4.0.1 on linux there was no such bug as far as I remember.
> Almost 2 years... :(

Why try to remember when you can try it: https://downloadarchive.documentfoundation.org/libreoffice/old/4.4.0.3/
https://wiki.documentfoundation.org/Installing_in_parallel/Linux
Comment 14 Timur 2017-01-04 17:34:45 UTC
I tested with 4.3.7 and Lin looks like Win (which would be correct), while with 4.4.0.3 it's like now (not correct). 
I'll ask for bibisect. If confirmed, "regression" should be added.

Text is Times New Roman but installation doesn't seem to affect how it looks. BTW currently ttf-mscorefonts-installer doesn't install fonts: https://sourceforge.net/p/corefonts/bugs/34/
Comment 15 Buovjaga 2017-01-04 19:04:35 UTC
(In reply to Timur from comment #14)
> I tested with 4.3.7 and Lin looks like Win (which would be correct), while
> with 4.4.0.3 it's like now (not correct). 
> I'll ask for bibisect. If confirmed, "regression" should be added.

Ok, I guess my result from 3.3 is irrelevant: changing version back to earliest, was 4.4.0.2, now our version field has it hidden, so "4.4.0.3".

Adding keyword regression - there is no need to wait for bibisect results as you confirmed it.
Comment 16 Xisco Faulí 2017-01-05 10:10:41 UTC
Regression introduced by:

author	Chris Sherlock <chris.sherlock79@gmail.com>	2014-12-23 13:31:45 (GMT)
committer	Chris Sherlock <chris.sherlock79@gmail.com>	2014-12-23 13:36:07 (GMT)
commit 6acf1c7ab7b514a8713ed66b74efbee1a75f029a (patch)
tree e2d9b06e2c935426b3eb08bf843663085946ee77
parent c18468bbef6f701520116485fa20a790a2c837e9 (diff)
vcl: fdo#87510 regression in GetFontMetric
Unfortunately when I refactored the code some time ago in commit 588bb542bebd
I forgot to remove the original assignment to mnExtLeading. This fixes this issue.

Adding Cc: to Chris Sherlock
Comment 17 Timur 2017-07-27 16:10:01 UTC
Bug 87510 fixed "line spacing wrong" for attachment 111059 [details] that was marked regression in 4.3 so fixed from 4.4. What I conclude it's OK in Linux only.
In Windows I always have the same result with that file, what's marked "wrong", ever since OO.
So maybe we - or I - were wrong in this bug. It depends on what is "correct" in Lin-Win mismatch.
If we take Bug 87510 as a reference, than this bug is not a regression since 4.4 in Linux (because that's only a change from bug 87510), but inherited mismatch from OO in Windows.
Comment 18 V Stuart Foote 2017-07-27 17:27:19 UTC
Wait, wasn't the calculation of line spacing supposed be the same now cross platform with Khaled's fixes for line spacing for bug 55469? 

If there are different between Linux & Windows builds, is it because the font metrics are different. The test documents, attachment 111059 [details] from bug 87510, and attachment 117000 [details] from here, use Arial and Times New Roman respectively. 

On Linux those are going to come from MS TrueType Core fonts, packaged as msttcore-fonts or mscorefonts depending on distro. Do the font metrics from mscorefonts actually match the MS fonts distributed with Windows?

If they match, do we need to actually calculate a line height (ascent + descent + internal leading) per font instance and use that?

=-ref-=
https://gerrit.libreoffice.org/#/c/31053/
https://cgit.freedesktop.org/libreoffice/core/commit/?id=34d7602954d4483b3bc9db700e7df2c15348947a
Comment 19 QA Administrators 2018-08-19 02:36:47 UTC Comment hidden (obsolete)
Comment 20 mozello 2018-08-20 16:25:18 UTC
Hello!
Tried open that old file in LO 6.1.0.3 (windows 7 32bit vs Kubuntu 18.04 appimage). Nothing changed! The bug is still there.
If you change font from Times New Roman to Liberation Sans it is still different in Windows and Linux.
Comment 21 Timur 2018-11-07 16:09:53 UTC
Created attachment 146407 [details]
ODT file - font Liberation

Repro 6.2+. Confirmed that it is also different with Liberation Sans.
Comment 22 QA Administrators 2019-11-08 03:37:48 UTC Comment hidden (obsolete, spam)
Comment 23 QA Administrators 2021-11-08 04:08:19 UTC Comment hidden (obsolete)
Comment 24 Hossein 2022-01-03 15:23:24 UTC
The bug is still reproducible with the latest master:

Output for Windows and Linux is different:

Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: f6fefed87a3ffac4a8d236e6a96a6405bfbb31f0
CPU threads: 32; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: en-US (en_DE); UI: en-US
Calc: threaded

Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: f6fefed87a3ffac4a8d236e6a96a6405bfbb31f0
CPU threads: 8; OS: Linux 5.11; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 25 Xisco Faulí 2022-05-02 14:45:07 UTC Comment hidden (obsolete)