Bug Hunting Session
Bug 108717 - Fractional font size is rounded differently on Windows
Summary: Fractional font size is rounded differently on Windows
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
Modified: 2019-04-07 19:07 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
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
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Georgy 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 Khaled Hosny 2017-06-23 17:25:33 UTC
Does it happen with other fonts, like Liberation Serif?
Comment 4 Khaled Hosny 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 2017-06-23 17:42:11 UTC
Initially it was found on 5.2.x versions.
Comment 6 Georgy 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 Khaled Hosny 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 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 Khaled Hosny 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 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 2017-06-26 12:08:37 UTC
Could somebody test it on Mac?
Comment 12 Georgy 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 2018-07-01 19:51:41 UTC
The bug is still affects Libreoffice (6.5)
Comment 15 Georgy 2019-04-07 19:07:57 UTC
I suppose it happens because win  vcl on uses win api to get line width.