Bug 95157 - Some italicized letters are not completely displayed when followed by regular characters that are highlighted
Summary: Some italicized letters are not completely displayed when followed by regular...
Status: RESOLVED DUPLICATE of bug 43643
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-18 14:45 UTC by jlbraga
Modified: 2023-10-12 20:44 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
italic character slightly cut (3.61 KB, image/png)
2015-10-18 14:45 UTC, jlbraga
Details
look closely, the "y" is slightly cut (9.73 KB, application/vnd.oasis.opendocument.text)
2015-10-18 16:18 UTC, jlbraga
Details
Test with highlighting shows wrong overlapping. Without highlighting the text appears correctly (12.42 KB, application/vnd.oasis.opendocument.text)
2019-06-04 10:42 UTC, Viktor Mileikovskyi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jlbraga 2015-10-18 14:45:49 UTC
Created attachment 119715 [details]
italic character slightly cut

When I write a word in italic and the immediate character is not italic, the character in italic gets slightly cut where the intermitent cursor/selection area limit was standing. The "not italic" order sent to the place where the cursor/selection area limit is erases the part where the italic character is placed.
See the attached file, please.
Comment 1 raal 2015-10-18 15:03:44 UTC
I can not confirm with LO 5.0.2, win7. Please attach test file and test with version 5.0.2.
http://www.libreoffice.org/download/libreoffice-fresh/
Comment 2 jlbraga 2015-10-18 16:18:58 UTC
Created attachment 119717 [details]
look closely, the "y" is slightly cut
Comment 3 raal 2015-10-18 17:50:28 UTC
I can  confirm with Version: 5.1.0.0.alpha1+
Build ID: 8273350ff48f198efc9dc9c5de5519b8cbdc0cb3
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2015-10-07_05:54:26
and LibreOffice 3.5.0
Comment 4 QA Administrators 2016-11-08 11:41:00 UTC Comment hidden (obsolete)
Comment 5 jlbraga 2016-11-08 15:39:51 UTC
I tested the bug and it still remains.

I write some text in normal mode, followed by a comma. I select the text but not the comma and turn it to italic. The vertical limit of the selection area "cuts" the last letter of the text. It's like the italic wants to get out of the selection area and the part that would get out of it is cut of and not displayed.
Comment 6 jlbraga 2016-11-08 15:40:28 UTC Comment hidden (obsolete)
Comment 7 jlbraga 2016-11-09 22:44:20 UTC
Oh, and my OS is Windows 10, and my LO version is 5.1.6.2!
Comment 8 Aron Budea 2016-11-10 01:24:26 UTC
Indeed, the bug is still there. Looks much better with a 5.3 daily build, though (using the unified layout), the "y" is only cut in the first line, but not anymore in line 2 and 3.
Comment 9 QA Administrators 2017-11-12 11:00:47 UTC Comment hidden (obsolete)
Comment 10 Viktor Mileikovskyi 2019-06-04 10:34:08 UTC
The same problem appears using italic character with subscript.
Very strong cut (up to half-letter) can be obtained using drawing fonts (like ISOCPEUR).

I can confirm it in LO 6.2.4.2 during diaplaying, PDF export and printing, when the text is highlighted, especially, in the color of the page background. When I select the affected text and choose "No Fill" in the highlight button, the font appears normally.

The problem is, possibly, caused by a mistake displaying characters.
Non-highlighted characters are displayed by setting foreground pixels only. Background pixels are not changed. If the next character coincides with the previous one, the collision will be resolved correctly like ligature.
Highlighted characters are displayed by setting both foreground and background pixels. The next character will overwrite the previous one, causing a crop.

One of the possible solutions is using special overlapping algorithms:
1. Setting background pixels only if they are not in the boundary of the previous character (priority by the previous character). It can cause partial highlighting of the first highlighted character.
2. Setting background pixels only if they are not set by the previous character (priority by the next character). It can cause partial highlighting of the previous non-highlighted character. This solution is seen at other text editors.
3. Setting background pixels only if they are not set by the previous character, starting from the average line between characters (balanced). It can cause some throttling of the program but the result appears better.


To avoid problems with old maschines, it is possible to add an option to LibreOffice settings.
Comment 11 Viktor Mileikovskyi 2019-06-04 10:42:36 UTC
Created attachment 151899 [details]
Test with highlighting shows wrong overlapping. Without highlighting the text appears correctly
Comment 12 QA Administrators 2023-03-11 03:24:50 UTC Comment hidden (obsolete)
Comment 13 Stéphane Guillou (stragu) 2023-10-12 20:44:36 UTC
(In reply to Viktor Mileikovskyi from comment #11)
> Created attachment 151899 [details]
> Test with highlighting shows wrong overlapping. Without highlighting the
> text appears correctly

I observe the same thing, original attachment 119717 [details] had a white highlight on the last character, which is what would hide part of the previous character.
Changing the summary accordingly.
Same in OOo 3.3, and reproduced 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

But this is already tracked in bug 43643.

*** This bug has been marked as a duplicate of bug 43643 ***