Bug 43643 - Character highlighting sometimes hides / cuts off adjacent glyphs / characters because it is drawn in front
Summary: Character highlighting sometimes hides / cuts off adjacent glyphs / character...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL: https://ask.libreoffice.org/t/will-th...
Whiteboard:
Keywords:
: 95157 107663 113313 135053 141074 149848 157249 (view as bug list)
Depends on:
Blocks: Font-Rendering Character Highlight-Color
  Show dependency treegraph
 
Reported: 2011-12-08 13:05 UTC by James Kang
Modified: 2024-04-18 18:44 UTC (History)
12 users (show)

See Also:
Crash report or crash signature:


Attachments
The attached file demonstrates the above example "commended by" (11.04 KB, application/vnd.oasis.opendocument.text)
2011-12-08 13:05 UTC, James Kang
Details

Note You need to log in before you can comment on or make changes to this bug.
Description James Kang 2011-12-08 13:05:40 UTC
Created attachment 54252 [details]
The attached file demonstrates the above example "commended by"

The problem occurs when an italicized word is highlighted. The edge of the word appears to be cut off by the space.  For example, highlight the following phrase "commended by", and note the 2nd 'd'.
Comment 1 tester8 2012-01-12 06:51:27 UTC
I can't see find words in this document. Are you sure to upload right document?
Comment 2 Vicente Rafael Estévez Vacas 2012-04-15 09:10:57 UTC
[Reproducible] with "LibreOffice 3.5.2.2 - Windows XP (32bit) Spanish
UI"
[Reproducible] with "LibreOffice 3.4.6 - Debian Squeeze (32bit) Spanish
UI"

In both versions I observe the same fault. I do mention that the preview (Page View) does not appear cut d.
Comment 3 sasha.libreoffice 2012-04-27 09:54:08 UTC
reproduced in 3.3.4 and 3.5.2 on Fedora 64 bit and Windows 7 32 bit
problem appears when italic and non-italic text intermixed and highlighted 
changing version to 3.3.4 as most early reproducible
Comment 4 QA Administrators 2015-04-19 03:22:33 UTC Comment hidden (noise)
Comment 5 Adolfo Jayme Barrientos 2015-04-20 02:55:34 UTC
This bug is still present in LibreOffice 4.4.2.2, Windows 8.1.
Comment 6 QA Administrators 2016-09-20 09:32:58 UTC Comment hidden (noise, obsolete)
Comment 7 QA Administrators 2019-12-03 13:59:09 UTC Comment hidden (noise)
Comment 8 QA Administrators 2021-12-03 04:23:58 UTC Comment hidden (noise)
Comment 9 Alex 2023-08-12 18:38:04 UTC
I can still reproduce this in:

Version: 7.5.5.2 (X86_64) / LibreOffice Community
Build ID: 50(Build:2)
CPU threads: 4; OS: Linux 6.2; UI render: default; VCL: gtk3
Locale: en-GB (en_GB.UTF-8); UI: en-GB
Ubuntu package version: 4:7.5.5-0ubuntu0.23.04.1
Calc: threaded

But only in Liberation/DejaVu Sans fonts and not Liberation/DejaVu Serif font.
Comment 10 ⁨خالد حسني⁩ 2023-08-13 07:00:48 UTC
This is because the space between the italic and upright text is set to use upright style, and its highlight color is covering the part of the italic text that leans out of its margin, if the space gets marked italic, the issue goes away, which should be a good work around.
Comment 11 BogdanB 2023-09-21 05:38:39 UTC
*** Bug 135053 has been marked as a duplicate of this bug. ***
Comment 12 Stéphane Guillou (stragu) 2023-10-12 20:44:36 UTC
*** Bug 95157 has been marked as a duplicate of this bug. ***
Comment 13 Stéphane Guillou (stragu) 2023-10-12 20:47:22 UTC
Same in OOo 3.3, and still in recent trunk build:

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: ff9c8b62c1015972e9e89799832fa3690dcd46b4
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded
Comment 14 Stéphane Guillou (stragu) 2023-10-12 20:52:40 UTC
*** Bug 107663 has been marked as a duplicate of this bug. ***
Comment 15 Mike Kaganski 2023-10-13 07:10:17 UTC
*** Bug 157249 has been marked as a duplicate of this bug. ***
Comment 16 Mike Kaganski 2023-10-13 07:13:30 UTC
Please also see bug 135053 comment 13. Citing from the latter:

> it seems that the problem is in the sequence that is used for painting the characters
> backgrounds. Wherever a new run of characters is started (i.e., a formatting of
> characters is somehow different from the previous), the rectangle for this new run
> is filled with its background (if exists) *after* the previous run is fully painted,
> so the new area fill may erase parts of earlier characters that happened to overlap.
> 
> It looks like an obvious fix would be to postpone drawing foreground character glyphs
> only after all backgrounds were painted... no idea how difficult could that be.
Comment 17 Stéphane Guillou (stragu) 2023-10-13 07:16:43 UTC
Making the summary more general, as there are other cases that don't involve italics vs upright. For example:
- a Combining Comma Below (U+0326) preceding a highlighted character in bug 141074's attachment 17089
- "p" cut off in attachment 169510 [details] even if the whole highlighted paragraph is in italics (zoom level influences it).
Comment 18 Stéphane Guillou (stragu) 2023-10-13 07:17:37 UTC
*** Bug 113313 has been marked as a duplicate of this bug. ***
Comment 19 Stéphane Guillou (stragu) 2023-10-13 07:18:16 UTC
*** Bug 141074 has been marked as a duplicate of this bug. ***
Comment 20 Stéphane Guillou (stragu) 2023-10-13 07:20:46 UTC
*** Bug 149848 has been marked as a duplicate of this bug. ***