Bug 152048 - Wrong rendering of underline for justified Arabic/Persian text with kashida
Summary: Wrong rendering of underline for justified Arabic/Persian text with kashida
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:
Whiteboard:
Keywords:
Depends on:
Blocks: Paragraph Character Kashida-Justification
  Show dependency treegraph
 
Reported: 2022-11-14 23:38 UTC by Hossein
Modified: 2022-11-15 22:25 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
Justified Persian text (ODT), all the text is underlined (Wrong rendering) (14.12 KB, application/vnd.oasis.opendocument.text)
2022-11-14 23:41 UTC, Hossein
Details
Justified Persian text (ODT), all the text is underlined (Wrong rendering) (6.01 KB, application/pdf)
2022-11-14 23:42 UTC, Hossein
Details
Justified Persian text (ODT), without underlining below Kashida (14.14 KB, application/vnd.oasis.opendocument.text)
2022-11-14 23:46 UTC, Hossein
Details
Justified Persian text (PDF), without underlining below Kashida (6.03 KB, application/pdf)
2022-11-14 23:48 UTC, Hossein
Details
Justified Persian/English text (ODT), all the text is underlined (wrong rendering) (16.33 KB, application/vnd.oasis.opendocument.text)
2022-11-14 23:54 UTC, Hossein
Details
Justified Persian/English text (PDF), all the text is underlined (wrong rendering) (12.90 KB, application/pdf)
2022-11-14 23:56 UTC, Hossein
Details
Justified Persian/English text (PDF), all the text is underlined (LO 3.5) (12.90 KB, application/pdf)
2022-11-15 22:04 UTC, Hossein
Details
Justified Persian/English text (PDF), all the text is underlined (OOo 3.2) (12.91 KB, application/pdf)
2022-11-15 22:05 UTC, Hossein
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hossein 2022-11-14 23:38:34 UTC
Description:
If you underline the text for a paragraph with justified Arabic/Persian text, there are situations that rendering of the underline for the text with kashida is incorrect.

Steps to Reproduce:
1. Open attachment. All the text should have underline

Actual Results:
The underline is cut off or rendered out of the correct region

Expected Results:
The underline should be rendered consistently below all of the text.

Reproducible: Always


User Profile Reset: No


Additional Info:
The problem is visible with the latest LO 7.5 dev master:

Version: 7.5.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 022eafa4d69bc8290aa304b69af2c325fe3d2a02
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 1 Hossein 2022-11-14 23:41:14 UTC
Created attachment 183600 [details]
Justified Persian text (ODT), all the text is underlined (Wrong rendering)

All the text is underlined in this example. The rendering is incorrect because the underline falls out of the text margins.
Comment 2 Hossein 2022-11-14 23:42:57 UTC
Created attachment 183601 [details]
Justified Persian text (ODT), all the text is underlined (Wrong rendering)

This is the PDF output from the above ODT file with the latest LO 7.5 dev master
Comment 3 Hossein 2022-11-14 23:46:26 UTC
Created attachment 183602 [details]
Justified Persian text (ODT), without underlining below Kashida

This example is different from the above ODT/PDF because character with kashida is not underlined. As a result, LibreOffice correctly renders this example file! This difference shows that kashida is the root cause of this problem.
Comment 4 Hossein 2022-11-14 23:48:12 UTC
Created attachment 183603 [details]
Justified Persian text (PDF), without underlining below Kashida

This is the PDF output for the previous example. In this specific situation, the rendering becomes OK. See the above comment.
Comment 5 Hossein 2022-11-14 23:54:04 UTC
Created attachment 183604 [details]
Justified Persian/English text (ODT), all the text is underlined (wrong rendering)

This example is a mix of RTL/LTR text. All the text is underlined, but part of the text is not underlined, which shows incorrect rendering.
Just like previous example, If you select the character with kashida and remove underline from it by pressing Ctrl+u, underline for other parts of the word become OK.
Comment 6 Hossein 2022-11-14 23:56:37 UTC
Created attachment 183605 [details]
Justified Persian/English text (PDF), all the text is underlined (wrong rendering)

This is the PDF output from the previous example. The rendering is incorrect, because the underline is shown only partially, while all of the text has the underline style. Please see previous comment.
Comment 7 افشین 2022-11-15 04:25:55 UTC
I can reproduce this bug. 

Version: 7.4.2.3 / LibreOffice Community
Build ID: 40(Build:3)
CPU threads: 2; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: fa-IR (en_US.UTF-8); UI: en-US
Ubuntu package version: 1:7.4.2~rc3-0ubuntu0.22.04.1~lo1
Calc: threaded
Comment 8 خالد حسني 2022-11-15 20:10:04 UTC
It would be helpful to find out of this is a regression or not.
Comment 9 Hossein 2022-11-15 22:04:06 UTC
Created attachment 183614 [details]
Justified Persian/English text (PDF), all the text is underlined (LO 3.5)

The problem is reproducible with LO 3.5:

LibreOffice 3.5.0rc3 
Build ID: 7e68ba2-a744ebf-1f241b7-c506db1-7d53735
Comment 10 Hossein 2022-11-15 22:05:37 UTC
Created attachment 183615 [details]
Justified Persian/English text (PDF), all the text is underlined (OOo 3.2)

Reproducible with OOo 3.2

OpenOffice.org 3.2.1
OOO320m18 (Build: 9502)
Comment 11 Hossein 2022-11-15 22:25:24 UTC
(In reply to خالد حسني from comment #8)
> It would be helpful to find out of this is a regression or not.
With the above outputs from LO 3.5 and OOo 3.2.1, I can say this is not a regression. The situation is a little bit better now, but the main problem is inherited from OpenOffice.org.