Bug 154235 - Underline blends with bold text in Liberation
Summary: Underline blends with bold text in Liberation
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
7.5.0.0 alpha1+
Hardware: All All
: medium normal
Assignee: ⁨خالد حسني⁩
URL:
Whiteboard: target:7.6.0 target:7.5.3
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Font-Rendering
  Show dependency treegraph
 
Reported: 2023-03-17 01:27 UTC by Tasos
Modified: 2024-07-11 13:29 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample PDF exhibiting the issue (7.34 KB, application/pdf)
2023-03-17 01:29 UTC, Tasos
Details
Sample PDF exported using an older version, not exhibiting the issue (7.39 KB, application/pdf)
2023-03-17 01:30 UTC, Tasos
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tasos 2023-03-17 01:27:07 UTC
Description:
Text in Liberation (either Sans or Serif) that is simultaneously bold and underlined results in the underline blending in with the actual text.

At least in Writer, at certain zoom levels the underline is spaced and doesn't blend. At all other zoom levels, and in exported PDFs, the text blends in with the underline. The issue is more apparent with Liberation Serif.

This does not occur with version 7.4.6.2.
Version 7.5.0.0 alpha0+ was not tested, as there is no readily available build for it. All versions after that exhibit this behaviour.

The component "LibreOffice" was picked, as this issue happens in at least Writer, Impress and Calc. Unsure if there is a better suited component for this.

Steps to Reproduce:
1. Write "Hello, World!".
2. Ensure the font is Liberation Serif.
3. Make the previously written text Bold.
4. Underline the previously written text.
5. Zoom in/out, or export as PDF.

Actual Results:
The underline blends with the text, making it look ugly and compromising its readability.

Expected Results:
The underline should be spaced accordingly, or possibly not be bold.


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Version: 7.5.1.2 (X86_64) / LibreOffice Community
Build ID: 50(Build:2)
CPU threads: 32; OS: Linux 6.2; UI render: Skia/Vulkan; VCL: gtk3
Locale: el-GR (el_GR.UTF-8); UI: en-GB
Ubuntu package version: 4:7.5.1~rc2-0ubuntu0.20.04.1~lo1
Calc: threaded
Comment 1 Tasos 2023-03-17 01:29:23 UTC
Created attachment 186019 [details]
Sample PDF exhibiting the issue
Comment 2 Tasos 2023-03-17 01:30:49 UTC
Created attachment 186020 [details]
Sample PDF exported using an older version, not exhibiting the issue
Comment 3 ⁨خالد حسني⁩ 2023-03-17 17:36:07 UTC
I can reproduce. Oddly enough it happens only in PDF export but not on screen.
Comment 4 raal 2023-03-17 18:16:22 UTC
This seems to have begun at the below commit in bibisect repository/OS linux-64-7.5.
Adding Cc: to خالد حسني ; Could you possibly take a look at this one?
Thanks
 beb64b92f88af0a93662d9aeb5186cd1f6535058 is the first bad commit
commit beb64b92f88af0a93662d9aeb5186cd1f6535058
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Fri Sep 30 21:00:15 2022 +0200

    source ba03e033d1be4bc49f2a8d6afbeecd381507b242


140803: vcl: Use font’s underline/strike position and size | https://gerrit.libreoffice.org/c/core/+/140803
Comment 5 ⁨خالد حسني⁩ 2023-03-17 20:40:09 UTC
(In reply to raal from comment #4)
> This seems to have begun at the below commit in bibisect repository/OS
> linux-64-7.5.
> Adding Cc: to خالد حسني ; Could you possibly take a look at this one?
> Thanks
>  beb64b92f88af0a93662d9aeb5186cd1f6535058 is the first bad commit
> commit beb64b92f88af0a93662d9aeb5186cd1f6535058
> Author: Jenkins Build User <tdf@pollux.tdf>
> Date:   Fri Sep 30 21:00:15 2022 +0200
> 
>     source ba03e033d1be4bc49f2a8d6afbeecd381507b242
> 
> 
> 140803: vcl: Use font’s underline/strike position and size |
> https://gerrit.libreoffice.org/c/core/+/140803

The issue starts appearing here indeed, but this commit merely uncovered a subtle bug in PDF export code.
Comment 6 Commit Notification 2023-03-17 23:08:13 UTC
Khaled Hosny committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/155028fa20d89713ec82168e5c7570333a47136d

tdf#154235: Fix underline position in PDF export

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 Commit Notification 2023-03-18 02:09:33 UTC
Khaled Hosny committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6f54b54ec3dc51fb8824adb08620fde4c70d10f2

tdf#154235: Ignore underline metrics for all Liberation fonts

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2023-03-18 18:06:50 UTC
Khaled Hosny committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

https://git.libreoffice.org/core/commit/8dda5eb8a7aa44bab6b894e7c378fcd0095f3f4e

tdf#154235: Ignore underline metrics for all Liberation fonts

It will be available in 7.5.3.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Tasos 2023-03-19 16:38:04 UTC
Tested the latest available daily build (b5c3a7502f7f) and I confirm that the issue is resolved. Thank you!