Bug Hunting Session
Bug 106653 - RTL Arabic justified text has some gaps between characters
Summary: RTL Arabic justified text has some gaps between characters
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.3.1.2 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on: 104921
Blocks: Font-Rendering
  Show dependency treegraph
 
Reported: 2017-03-20 01:45 UTC by Munzir Taha
Modified: 2019-04-06 08:53 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
libO introduced gaps in some words (12.34 KB, application/vnd.oasis.opendocument.text)
2017-03-20 01:47 UTC, Munzir Taha
Details
PDF export also has the same issue (7.91 KB, application/pdf)
2017-03-20 01:48 UTC, Munzir Taha
Details
reproduceable without marks (9.47 KB, application/vnd.oasis.opendocument.text)
2017-03-23 05:06 UTC, Munzir Taha
Details
reproduceable without marks (screenshot) (28.76 KB, image/png)
2017-03-23 05:07 UTC, Munzir Taha
Details
source document (8.15 KB, application/vnd.oasis.opendocument.text)
2017-07-06 01:55 UTC, Munzir Taha
Details
The good (127.92 KB, image/png)
2017-07-06 01:57 UTC, Munzir Taha
Details
The bad (114.02 KB, image/png)
2017-07-06 01:58 UTC, Munzir Taha
Details
A repeated text in Farsi with several fonts (17.31 KB, application/vnd.oasis.opendocument.text)
2019-04-04 16:15 UTC, Babak Razmjoo
Details
The PDF generated by LibreOffice 6.1.5.2 from the previous file (154.56 KB, application/pdf)
2019-04-04 16:16 UTC, Babak Razmjoo
Details
The PDF generated by LibreOffice 6.2.2.2 from the previous file (154.81 KB, application/pdf)
2019-04-04 16:17 UTC, Babak Razmjoo
Details
How LibreOffice 6.2.2.2 actually displays this text- part 1 (42.32 KB, image/png)
2019-04-04 16:21 UTC, Babak Razmjoo
Details
How LibreOffice 6.2.2.2 actually displays this text- part 2 (41.48 KB, image/png)
2019-04-04 16:22 UTC, Babak Razmjoo
Details
How LibreOffice 6.2.2.2 actually displays this text- part 3 (40.13 KB, image/png)
2019-04-04 16:23 UTC, Babak Razmjoo
Details
How LibreOffice 6.2.2.2 actually displays this text- part 4 (32.24 KB, image/png)
2019-04-04 16:24 UTC, Babak Razmjoo
Details
How LibreOffice 6.2.2.2 actually displays this text- part 5 (36.07 KB, image/png)
2019-04-04 16:25 UTC, Babak Razmjoo
Details
How LibreOffice 6.2.2.2 actually displays this text- part 6 (29.29 KB, image/png)
2019-04-04 16:27 UTC, Babak Razmjoo
Details
How LibreOffice 6.2.2.2 actually displays this text- part 1-revised (42.96 KB, image/png)
2019-04-04 16:49 UTC, Babak Razmjoo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Munzir Taha 2017-03-20 01:45:37 UTC
Description:
I am attaching a document where I repeated three words many times and set the text to be justified. Some of the words got a gap between characters that shouldn't be there. I marked those with the problem with a red color, and one can easily see what's wrong by comparing them to the other non-red words. I am also attaching a PDF that's an export of the document that shows the problem persists in the pdf.

Steps to Reproduce:
1. Open my attached file
2. The red words should look similar to the black words

Actual Results:  
gaps are introduced between characters.

Expected Results:
No gaps should be introduced in justified text.


Reproducible: Always

User Profile Reset: Yes

Additional Info:


User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0
Comment 1 Munzir Taha 2017-03-20 01:47:04 UTC
Created attachment 132020 [details]
libO introduced gaps in some words
Comment 2 Munzir Taha 2017-03-20 01:48:10 UTC
Created attachment 132021 [details]
PDF export also has the same issue
Comment 3 V Stuart Foote 2017-03-20 05:12:04 UTC
Is this another manifestation of needing floating point glyph positioning for enhancement bug 103322?
Comment 4 Xisco Faulí 2017-03-20 09:05:37 UTC
I can't reproduce it in

Version: 5.4.0.0.alpha0+
Build ID: d3b5bd4a07a619db6bee1c39c32280ac3c620532
CPU threads: 4; OS: Linux 4.8; UI render: default; VCL: gtk2; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group

Khaled should be able to comment more on this...
Comment 5 Khaled Hosny 2017-03-20 13:32:59 UTC
That is a kashida issue, in the gap there should be a kashida but it moves to the wrong direction due to the presence of combining mark on the right of it. I don’t have the same font, but other fonts show the issue as well.

I recall fixing this exact issue at some point, but I can reproduce with 5.3, may be it was fixed on 5.4 but I can’t test it right now.
Comment 6 Munzir Taha 2017-03-20 14:09:03 UTC
@Khaled: Yes, I noticed the bug with many fonts including Amiri but it happens in a random way that even closing the file and reopening it could make it disappear in one place and appear in another. The current sample shows a more consistent case.

Shouldn't there be a way to disable kashida justification and resort to space justification only?
Comment 7 Khaled Hosny 2017-03-20 14:27:46 UTC
(In reply to Munzir Taha from comment #6)
> Shouldn't there be a way to disable kashida justification and resort to
> space justification only?

Probably yes, but it might require both changes to the UI and the file format, I don’t know for sure.
Comment 8 Munzir Taha 2017-03-23 05:05:21 UTC
@Khaled: you mentioned that
> the gap there should be a kashida but it moves to the wrong direction
> due to the presence of combining mark on the right of it

However, I can reproduce it with no marks on the right of it. Attached is an example file and a screenshot
Comment 9 Munzir Taha 2017-03-23 05:06:38 UTC
Created attachment 132086 [details]
reproduceable without marks
Comment 10 Munzir Taha 2017-03-23 05:07:11 UTC
Created attachment 132087 [details]
reproduceable without marks (screenshot)
Comment 11 Munzir Taha 2017-07-06 01:55:43 UTC
Created attachment 134506 [details]
source document
Comment 12 Munzir Taha 2017-07-06 01:57:48 UTC
Created attachment 134507 [details]
The good

The good
Comment 13 Munzir Taha 2017-07-06 01:58:17 UTC
Created attachment 134508 [details]
The bad

The bad
Comment 14 Munzir Taha 2017-07-06 01:59:08 UTC
I've just attached another extreme case example, where the kashida messed up the text though I haven't even used justification! Just by changing the zoom from 351% to 352% I got the bad text. Attached is the source document and two screenshots; one shows the good, the other shows the bad.
Comment 15 Babak Razmjoo 2019-04-04 16:15:15 UTC Comment hidden (off-topic)
Comment 16 Babak Razmjoo 2019-04-04 16:16:40 UTC Comment hidden (off-topic)
Comment 17 Babak Razmjoo 2019-04-04 16:17:31 UTC Comment hidden (off-topic)
Comment 18 Babak Razmjoo 2019-04-04 16:21:35 UTC Comment hidden (off-topic)
Comment 19 Babak Razmjoo 2019-04-04 16:22:30 UTC Comment hidden (off-topic)
Comment 20 Babak Razmjoo 2019-04-04 16:23:17 UTC Comment hidden (off-topic)
Comment 21 Babak Razmjoo 2019-04-04 16:24:09 UTC Comment hidden (off-topic)
Comment 22 Babak Razmjoo 2019-04-04 16:25:32 UTC Comment hidden (off-topic)
Comment 23 Babak Razmjoo 2019-04-04 16:27:25 UTC Comment hidden (off-topic)
Comment 24 Babak Razmjoo 2019-04-04 16:37:44 UTC Comment hidden (off-topic)
Comment 25 Babak Razmjoo 2019-04-04 16:39:34 UTC Comment hidden (off-topic)
Comment 26 Babak Razmjoo 2019-04-04 16:49:41 UTC Comment hidden (off-topic)
Comment 27 Khaled Hosny 2019-04-05 05:30:19 UTC Comment hidden (off-topic)