Bug 131763 - Character borders and area color don't render correctly when line spacing is fixed
Summary: Character borders and area color don't render correctly when line spacing is ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.2 all versions
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Borders
  Show dependency treegraph
 
Reported: 2020-04-01 02:15 UTC by Kenneth Hanson
Modified: 2025-01-10 09:50 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Test document demonstrating issue (22.72 KB, application/vnd.oasis.opendocument.text)
2020-04-01 02:16 UTC, Kenneth Hanson
Details
Exported PDF of test document (12.64 KB, application/pdf)
2020-04-01 02:17 UTC, Kenneth Hanson
Details
Character borders is several contexts (27.55 KB, application/vnd.oasis.opendocument.text)
2025-01-10 09:46 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kenneth Hanson 2020-04-01 02:15:32 UTC
Description:
The effect is somewhat inconsistent, but in general can be seen when text with a character border or area color formatting extends across multiple lines, whether by automatic line breaking, manual line breaks, and even paragraph breaks.

I believe you can get the effect even when short segments of text cut across lines, but it is easiest to demonstrate with very long segments.

I've provided an example with character borders.

Testing now with v6.4.2.2, but it's been around for several major versions.

Steps to Reproduce:
1. In paragraph formatting, set line spacing to "fixed" and choose a size noticeably larger than the font size
2. In character formatting, set character border or area.
3. Input text with this formatting that extends over multiple lines, via automatic line breaking, manual line breaks, or paragraph breaks

Actual Results:
Height of the border or colored area is inconsistent from line to line.

Expected Results:
Height of the border or colored area should be the same as the character height (?), or perhaps the full line height, but not randomly switch between the two.


Reproducible: Sometimes


User Profile Reset: No



Additional Info:
It's not clear to me what the correct behavior should be. It's not possible to configure line height and interline-spacing independently in LibreOffice, since each "line spacing" option works differently.
Comment 1 Kenneth Hanson 2020-04-01 02:16:12 UTC
Created attachment 159203 [details]
Test document demonstrating issue
Comment 2 Kenneth Hanson 2020-04-01 02:17:06 UTC
Created attachment 159204 [details]
Exported PDF of test document
Comment 3 Xisco Faulí 2020-04-01 09:17:57 UTC
Reproduced in

Version: 7.0.0.0.alpha0+
Build ID: 169a10f0e4680814145b668c6320be04038d7a89
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded

and

Version: 5.2.0.0.alpha1+
Build ID: 5b168b3fa568e48e795234dc5fa454bf24c9805e
CPU Threads: 4; OS Version: Linux 4.8; UI Render: default; 
Locale: ca-ES (ca_ES.UTF-8)

in previous versions, the border are not even imported
Comment 4 Regina Henschel 2020-04-01 23:48:28 UTC
Behavior of character border is not yet specified. It is still not clear, what should be the "correct" behavior. CSS, means browsers, and Microsoft Office do it different.
Comment 5 QA Administrators 2022-09-29 03:54:44 UTC Comment hidden (obsolete)
Comment 6 Kenneth Hanson 2023-01-10 16:17:01 UTC
No change as of v7.4.2.3.
Comment 7 QA Administrators 2025-01-10 03:12:50 UTC Comment hidden (obsolete)
Comment 8 Kenneth Hanson 2025-01-10 04:55:13 UTC
Bug still present in v24.2.7.2. First two tests in test document show irregular rendering. Third test renders correctly, but that one was inconsistent in previous versions, so it is hard to tell.
Comment 9 BogdanB 2025-01-10 05:36:41 UTC
I can reproduce also in
Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 8b2f6b4fba6c466ed399f4f4b80e9631f13a6232
CPU threads: 16; OS: Linux 6.8; UI render: default; VCL: x11
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded
Comment 10 BogdanB 2025-01-10 05:39:34 UTC
BUT, I suspected that something else could be here.

Xisco, Regina, could you try to test this bug with a new document? 
I removed the dirrect formatting and I applied a border, and the border is there even for fixe line spacing.
Comment 11 Regina Henschel 2025-01-10 09:46:41 UTC
Created attachment 198463 [details]
Character borders is several contexts

(In reply to BogdanB from comment #10)
> BUT, I suspected that something else could be here.
> 
> Xisco, Regina, could you try to test this bug with a new document? 
> I removed the dirrect formatting and I applied a border, and the border is
> there even for fixe line spacing.

The error is not about the existence of the character border, but about where the border is drawn.

In some cases the border is drawn so that it is tight to the characters, in other cases it is drawn at full line height.
Examples:
(A) A part of a paragraph has character borders: First and last line are tight, the other lines are at line height.
(B) A full paragraph has character borders: All borders are at line height.
(C) A full paragraph has character borders and the paragraph itself has a border: The first and last line are at line height, the middle line is tight.

Tested with Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: f4a3ffe1110aa38a3836533e6c51b910c68c2336
CPU threads: 32; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-US
Calc: threaded

In an exported docx opened with Word, all character borders are rendered tight. For better interoperability with should render character borders tight in all cases. The alternative to render all at line height is less good. The current inconsistency is surely a bug.
Comment 12 Regina Henschel 2025-01-10 09:50:43 UTC
The problem exist only for fixed line height. All other kind of line height render character borders tight. Just another reason to render them tight for fixed line height too.