Bug 152027

Summary: Gap in field shading
Product: LibreOffice Reporter: Eyal Rozenberg <eyalroz1>
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: NEW ---    
Severity: trivial CC: caolan.mcnamara, stephane.guillou
Priority: medium    
Version: Inherited From OOo   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=103643
https://bugs.documentfoundation.org/show_bug.cgi?id=35907
https://bugs.documentfoundation.org/show_bug.cgi?id=77279
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 43808, 107739    
Attachments: Illustration of gap
Document with field exhibiting the gap
Font family used in the sample document

Description Eyal Rozenberg 2022-11-13 22:23:47 UTC
Created attachment 183568 [details]
Illustration of gap

Sometimes, with Hebrew text in some fonts, the shading of a field exhibits gaps. I also see weird shading shaping when the font size or family changes sometimes, but for the purposes of this bug: Exactly the same font.

Seen with:

Version: 7.5.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 2486d99c6053af1414117faac2c0db18c0d344c4
CPU threads: 4; OS: Linux 6.0; UI render: default; VCL: gtk3
Locale: en-IL (en_IL); UI: en-US

and with 7.4.1.2 release on same platform and same VCL.
Comment 1 Eyal Rozenberg 2022-11-13 22:24:35 UTC
Created attachment 183569 [details]
Document with field exhibiting the gap

Note this document uses an uncommon Hebrew font. I'll attach that as well.
Comment 2 Eyal Rozenberg 2022-11-13 22:31:25 UTC
Created attachment 183570 [details]
Font family used in the sample document
Comment 3 Stéphane Guillou (stragu) 2022-11-15 12:25:47 UTC
Reproduced in:

Version: 7.5.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 6e66b5d75b4cda0314b64f4d12ef9e4350751470
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

and

Version: 7.4.2.3 / LibreOffice Community
Build ID: 382eef1f22670f7f4118c8c2dd222ec7ad009daf
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

and

Version: 6.3.6.2
Build ID: 2196df99b074d8a661f4036fca8fa0cbfa33a497
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3; 
Locale: en-AU (en_AU.UTF-8); UI-Language: en-US
Calc: threaded

Looks like it happens at the junction between LTR and RTL. Doesn't happen with text highlighting.
Comment 4 ⁨خالد حسني⁩ 2022-12-08 15:56:00 UTC
I suspect this is similar to bug 35907 and bug 103643, and bug 77279. I suspect that calculating the text extents to draw the underline or background is using low resolution or has rounding issues, so when the text is more than one portion a gap is shown.

Perhaps Caolán McNamara has some idea.
Comment 5 Stéphane Guillou (stragu) 2024-02-01 10:56:56 UTC
Reproduced in OOo 3.3 as well (although it breaks even more in the number: 2|02|2| נובמבר)