Bug 156364 - Fonts are displayed slightly different on Linux, which causes the characters to overlap
Summary: Fonts are displayed slightly different on Linux, which causes the characters ...
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
24.2.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Font-Rendering
  Show dependency treegraph
 
Reported: 2023-07-19 00:14 UTC by Hossein
Modified: 2023-09-05 15:50 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Comparing output in Linux and Windows (217.14 KB, image/png)
2023-07-19 00:14 UTC, Hossein
Details
PDF output from LibreOffice on Windows (30.74 KB, application/pdf)
2023-07-19 00:44 UTC, Hossein
Details
PDF output from LibreOffice on Linux (25.00 KB, application/pdf)
2023-07-19 00:45 UTC, Hossein
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hossein 2023-07-19 00:14:48 UTC
Created attachment 188456 [details]
Comparing output in Linux and Windows

Description:
With Harfbuzz as the font rendering engine in LibreOffice, it is expected that font rendering output on display and print are the same on different platforms. But, in reality there are slight differences. For example, in this case fonts are displayed slightly different on Linux, which causes the characters to overlap.

Steps to Reproduce:
1. Open attachment 188277 [details] in LO Writer dev master on Windows
2. Open the same file in LO Writer dev master on Linux
3. Compare the outputs on Windows and Linux display

Actual Results:
The outputs on display are different, and the characters sometimes overlap. For example, in the last line the starting » falls on the next character, which is ب and there is not (slight) space between them. Please look at «به همین دلیل» and other places in the start of double quotes «».

Expected Results:
Output on display in different platforms should be similar, and anyway the characters should not overlap in different zoom levels. There should be a slight space between » and ب in the last line.

For a comparison, the results are normalized (for size) and compared side by side in the attachment with 110% zoom level on both Windows and Linux. LO on Windows and Linux were built from the same git revision.


Reproducible: Always


User Profile Reset: No



Additional Info:
LO 24.2 dev master on Linux:
Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: bb01ef3865c406f322d6e656faba2191aaeeb6da
CPU threads: 12; OS: Linux 5.19; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: CL threaded

LO 24.2 dev master on Windows:
Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: bb01ef3865c406f322d6e656faba2191aaeeb6da
CPU threads: 12; OS: Windows 10.0 Build 22621; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded
Comment 1 Hossein 2023-07-19 00:44:08 UTC
Created attachment 188458 [details]
PDF output from LibreOffice on Windows

Please note that the difference is on display, and I see no difference in PDF output. I am putting the PDF files here for the reference.
Comment 2 Hossein 2023-07-19 00:45:48 UTC
Created attachment 188459 [details]
PDF output from LibreOffice on Linux

As declared above, this is also for the reference. The difference is on display.
Comment 3 ⁨خالد حسني⁩ 2023-07-19 03:21:36 UTC
Looks like difference in DPI to me, does the Windows machine have a hidpi screen and Linux machine has a regular one?
Comment 4 Hossein 2023-07-19 09:53:08 UTC
(In reply to ⁨خالد حسني⁩ from comment #3)
> Looks like difference in DPI to me, does the Windows machine have a hidpi
> screen and Linux machine has a regular one?
Windows machine has a higher resolution and 3x scaling, Linux machine also uses 2x scaling. So, both are considered HIDPI.

qtdiag reports:

Linux machine
Physical DPI: 142 (approximate, slightly different on x and y)
Logical DPI: 192
DevicePixelRatio: 1

Windows machine
Physical DPI: 78 (approximate, the same on x and y)
Logical DPI: 96 (native 288)
DevicePixelRatio: 3

I scaled the Linux screenshot by the factor of 1.5 to create the combined screenshot.
Comment 5 Buovjaga 2023-09-05 15:50:35 UTC
I don't use display scaling. I installed B Nazanin font and looked at the example file. I don't see the overlap in any zoom level.

Arch Linux 64-bit, X11
Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 6ee0f9f02f7255339e18ab9e6189b2200bb71e6e
CPU threads: 8; OS: Linux 6.4; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 5 September 2023