Bug 108717 - Font scaling gives different results on Windows and Unix (Mac, Linux)
Summary: Font scaling gives different results on Windows and Unix (Mac, Linux)
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All Windows (All)
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Font-Rendering
  Show dependency treegraph
 
Reported: 2017-06-23 13:42 UTC by Georgy Litvinov
Modified: 2024-08-22 03:15 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
File to reproduce problem. It renders differently on Windows and Linux. (8.94 KB, application/vnd.oasis.opendocument.text)
2017-06-23 13:42 UTC, Georgy Litvinov
Details
Comparison LibreOffice 5.3.3 on Linux and LibreOffice 5.3.3 on Windows 7 (14.96 KB, image/png)
2017-06-23 16:07 UTC, Xisco Faulí
Details
Test for Arial font (8.91 KB, application/vnd.oasis.opendocument.text)
2017-06-26 12:07 UTC, Georgy Litvinov
Details
The same bug reproduced with integer font size (8.55 KB, application/vnd.oasis.opendocument.text)
2021-04-24 14:25 UTC, Georgy Litvinov
Details
Comparison Windows Linux with integer font size (187.81 KB, image/jpeg)
2021-04-24 14:51 UTC, Georgy Litvinov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Georgy Litvinov 2017-06-23 13:42:21 UTC
Created attachment 134228 [details]
File to reproduce problem. It renders differently on Windows and Linux.

I found out that on Windows (tested on Windows XP and Windows 7) text with charHeight 10.89 renders as 10.8 
At the same time on Linux (tested on Ubuntu 14.04 and Centos 7) it renders as 10.9
As a result included file fit in one line on Windows and in 2 on Linux.
Libreoffice 5.3.4.2 on each PC.
For books (about 200 pages in LibreOffice on Windows) we have 220 pages in LibreOffice on Linux.
Fonts are equal on each platform (Times New Roman).
Scale width 95%
Comment 1 Xisco Faulí 2017-06-23 16:07:35 UTC
Created attachment 134233 [details]
Comparison LibreOffice 5.3.3 on Linux and LibreOffice 5.3.3 on Windows 7
Comment 2 Xisco Faulí 2017-06-23 16:08:05 UTC
@Khaled, any comment on this?
Comment 3 ⁨خالد حسني⁩ 2017-06-23 17:25:33 UTC
Does it happen with other fonts, like Liberation Serif?
Comment 4 ⁨خالد حسني⁩ 2017-06-23 17:27:12 UTC
Oh, you are comparing Windows and Linux not different version of Windows. Looks like a duplicate of bug 105992.
Comment 5 Georgy Litvinov 2017-06-23 17:42:11 UTC
Initially it was found on 5.2.x versions.
Comment 6 Georgy Litvinov 2017-06-23 17:52:58 UTC
(In reply to Khaled Hosny from comment #3)
> Does it happen with other fonts, like Liberation Serif?
I suppose no. Writer does not let to set Height to 10.89  for Liberation Serif (Writer rounds it).
Comment 7 ⁨خالد حسني⁩ 2017-06-23 18:08:14 UTC
(In reply to Georgy from comment #5)
> Initially it was found on 5.2.x versions.

No idea then. I think the use of fractional font size might the culprit, but I don’t know how exactly.
Comment 8 Georgy Litvinov 2017-06-23 19:50:25 UTC
I have reproduced the same behavior in openoffice 3.4.1 (compared Win 7 and Centos 7).
Looks like it is an old bug.
Comment 9 ⁨خالد حسني⁩ 2017-06-23 21:28:22 UTC
My wild guess is that we are rounding the font size somehow when loading fonts, and this rounding happens different between different platforms.
Comment 10 Georgy Litvinov 2017-06-26 12:07:24 UTC
Created attachment 134287 [details]
Test for Arial font

The same problem appears while using Arial font.
Comment 11 Georgy Litvinov 2017-06-26 12:08:37 UTC
Could somebody test it on Mac?
Comment 12 Georgy Litvinov 2017-06-27 10:40:57 UTC
Writer behavior on MacOS is the same as on Linux (2 lines).
Comment 13 QA Administrators 2018-06-29 02:46:10 UTC Comment hidden (obsolete)
Comment 14 Georgy Litvinov 2018-07-01 19:51:41 UTC
The bug is still affects Libreoffice (6.5)
Comment 15 Georgy Litvinov 2019-04-07 19:07:57 UTC
I suppose it happens because win  vcl on uses win api to get line width.
Comment 16 QA Administrators 2021-04-07 03:52:39 UTC Comment hidden (obsolete)
Comment 17 Georgy Litvinov 2021-04-08 12:26:24 UTC
Document view still different in Windows and Linux

Version: 7.2.0.0.alpha0+ / LibreOffice Community
Build ID: 43f4769ae537310a6fe6a1edfbc6687cc26fd996
CPU threads: 8; OS: Linux 3.10; UI render: default; VCL: gtk3
Locale: en-GB (en_GB.utf8); UI: en-US
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2021-03-20_00:16:48
Calc: threaded

Version 7.2.0.0.alpha0+ (x64)  LibreOffice Community
Build ID 07996bcca53939af02921a3d4681c6c7d62a0e40
CPU threads 7; OS Windows 6.1 Service Pack 1 Build 7601; UI render SkiaRaster; VCL win
Locale ru-RU (ru_RU); UI ru-RU
Calc threaded
Comment 18 Georgy Litvinov 2021-04-24 14:25:18 UTC
Created attachment 171383 [details]
The same bug reproduced with integer font size

File to reproduce the same bug with integer font size.
Comment 19 Georgy Litvinov 2021-04-24 14:51:53 UTC
Created attachment 171384 [details]
Comparison Windows Linux with integer font size


Version: 7.2.0.0.alpha0+ / LibreOffice Community
Build ID: 8ae3ae4bf75fdd0aaa132c956d9da029baa3adc6
CPU threads: 8; OS: Linux 3.10; UI render: default; VCL: gtk3
Locale: en-GB (en_GB.utf8); UI: en-US
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2021-04-23_17:13:02
Calc: threaded


Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: b38fd085608a44cf3a2d181e2720c758356647d7
CPU threads: 7; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: ru-RU
Calc: threaded
Comment 20 Georgy Litvinov 2021-04-24 18:53:25 UTC
In previous examples was used character scaling 95%.
My guess is that character scaling calculations give different results on different platforms.
Comment 21 Georgy Litvinov 2021-05-02 18:15:34 UTC Comment hidden (obsolete)
Comment 22 QA Administrators 2024-08-22 03:15:46 UTC
Dear Georgy Litvinov,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug