Bug Hunting Session
Bug 89034 - Text not being justified in Persian and other RTL languages (Not a kashida problem -- see comment #18)
Summary: Text not being justified in Persian and other RTL languages (Not a kashida pr...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.4.0.3 release
Hardware: Other Mac OS X (All)
: highest normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: notBibisectable, regression
: 91793 94101 95675 95820 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-02-02 04:20 UTC by factoreal
Modified: 2017-06-03 16:57 UTC (History)
12 users (show)

See Also:
Crash report or crash signature:


Attachments
Non-Justified Persian text in Libre 4.4.0.3 (12.41 KB, application/vnd.oasis.opendocument.text)
2015-02-02 04:20 UTC, factoreal
Details
Non-Justified Persian text in Libre 4.4.0.3 (255.61 KB, image/png)
2015-02-02 18:19 UTC, factoreal
Details
linux screenshot (117.18 KB, image/png)
2015-02-02 21:22 UTC, Yousuf Philips (jay) (retired)
Details
PDF LibreOffice-4-3-5-Archlinux (24.98 KB, application/pdf)
2015-02-03 09:42 UTC, Eman Amini
Details
ODT LibreOffice-4-3-5-Archlinux (27.13 KB, application/vnd.oasis.opendocument.text)
2015-02-03 09:43 UTC, Eman Amini
Details
LibreOffice-4-3-5-Archlinux-kashida-misses (12.01 KB, application/pdf)
2015-02-03 09:49 UTC, Eman Amini
Details
PDF with OpenOffice for comparison (12.24 KB, application/pdf)
2015-02-03 09:55 UTC, Eman Amini
Details
Good justifed document in Libre Version: 4.3.6.1 (264.32 KB, image/png)
2015-02-03 10:08 UTC, factoreal
Details
LO4352 screenshot (75.12 KB, image/png)
2015-02-03 14:39 UTC, Alex Thurgood
Details
LO Version: 4.5.0.0.alpha0+ (71.01 KB, image/png)
2015-02-03 14:42 UTC, Alex Thurgood
Details
Works for me in LO 5.2.3.3 (143.01 KB, image/png)
2016-11-06 16:41 UTC, eisa01
Details

Note You need to log in before you can comment on or make changes to this bug.
Description factoreal 2015-02-02 04:20:12 UTC
Created attachment 113043 [details]
Non-Justified Persian text in Libre 4.4.0.3

In LibreOffice version Version: 

4.4.0.3
Build ID: de093506bcdc5fafd9023ee680b8c60e3e0645d7
Locale: en_
OSX

with Persian language, justified alignment doesn't work properly.
Comment 1 Buovjaga 2015-02-02 11:51:37 UTC
Is this the same problem as bug 88976?

Set to NEEDINFO.
Change back to UNCONFIRMED after you have provided the information.
Comment 2 Yousuf Philips (jay) (retired) 2015-02-02 18:11:07 UTC
Hello factoreal,

It would be useful if you can provide a screenshot as the text looked justified to me. One thing that didnt look okay was the empty spacing between letters that is supposed to be joined in the second last line.
Comment 3 factoreal 2015-02-02 18:19:14 UTC
Created attachment 113060 [details]
Non-Justified Persian text in Libre 4.4.0.3

Screenshot of non-Justified Persian text in Libre 4.4.0.3
Comment 4 factoreal 2015-02-02 18:22:41 UTC
(In reply to Beluga from comment #1)
> Is this the same problem as bug 88976?
> 
> Set to NEEDINFO.
> Change back to UNCONFIRMED after you have provided the information.

Hey,
No, it's another problem, I think that it's about font and does not appear in OSX.

thanks
Comment 5 Yousuf Philips (jay) (retired) 2015-02-02 21:22:35 UTC
Created attachment 113070 [details]
linux screenshot

Justification look fine to on linux even after installed the font from http://openfontlibrary.org/en/font/xb-niloofar.

Version: 4.5.0.0.alpha0+
Build ID: d1c9bd13ec7af93f5368dfda6d6d3c955f0b0816
TinderBox: Linux-rpm_deb-x86@45-TDF, Branch:master, Time: 2015-01-28_00:25:56
Comment 6 Yousuf Philips (jay) (retired) 2015-02-02 21:23:27 UTC
Lets ask the QA mac team to see if they can confirm it on mac.
Comment 7 Eman Amini 2015-02-03 06:46:17 UTC
(In reply to Jay Philips from comment #5)
> Created attachment 113070 [details]
> linux screenshot
> 
> Justification look fine to on linux even after installed the font from
> http://openfontlibrary.org/en/font/xb-niloofar.
> 
> Version: 4.5.0.0.alpha0+
> Build ID: d1c9bd13ec7af93f5368dfda6d6d3c955f0b0816
> TinderBox: Linux-rpm_deb-x86@45-TDF, Branch:master, Time: 2015-01-28_00:25:56

Thanks Jay for your effort.
In this file everything seems to be fine except one thing.
After word "OCH" in line 4,  it seems in following four words kashida is missed. characters of these word has not joined together properly. 
فهرست، بندی، کنیم، کار
I'm not sure if this problem is because of kashida but it seems to be.
Comment 8 factoreal 2015-02-03 07:08:38 UTC
Hey Eman,
Did you see my screenshot? Are you OS X user and use LibreOffice Version: 4.4.0.3? Is it necessary to upload another screenshots? 
thanks
Comment 9 Alex Thurgood 2015-02-03 07:54:45 UTC
There are several RTL bugs on OSX at the moment with certain Hebrew/Arabic/Other RTL fonts. As I have no idea how such texts should display, it is difficult to confirm / deny that there actually is a problem.

I've added the corresponding links to other bug reports that are described as showing problems with RTL display, inlcuding spacing issues.
Comment 10 Alex Thurgood 2015-02-03 08:02:50 UTC
Allegedly, a fix was provided for an Arabic spacing problem that was pushed for integration in 440 beta 2, so this should be in 4403 production release, if my understanding of the branching off is correct. Perhaps the fix is incomplete, or doesn't apply to Persian ?
Comment 11 Alex Thurgood 2015-02-03 08:05:24 UTC
In order for me to test on OSX, I would need to be able to compare correct justification with incorrect justification. I have no idea at present how the text in the ODT document is supposed to be represented. Could someone provide me a screenshot of that document with a comparison of good/bad ?

Setting needinfo
Comment 12 retired 2015-02-03 08:34:45 UTC
@factoreal, do you have a software in which the text correctly displays on osx? Microsoft Word or NeoOffice maybe? As Alex pointed out, for a western guy whichout knowing what the file would look like when displayed correctly it is very difficult to tell, what to look for.

So maybe you can add a screenshot and in OS X use the function to put red marking around what is not being displayed correctly.
Comment 13 Eman Amini 2015-02-03 09:42:21 UTC
Created attachment 113079 [details]
PDF LibreOffice-4-3-5-Archlinux

The pdf file include description in English.
Comment 14 Eman Amini 2015-02-03 09:43:21 UTC
Created attachment 113080 [details]
ODT LibreOffice-4-3-5-Archlinux

The odt includes description in English.
Comment 15 Eman Amini 2015-02-03 09:49:19 UTC
Created attachment 113081 [details]
LibreOffice-4-3-5-Archlinux-kashida-misses

Line 1 in the following words kashida disappears inappropriately.
نوشته
شده
امید
که
For example between character شـ and ـتـ in the word نوشته
Comment 16 Eman Amini 2015-02-03 09:55:37 UTC
Created attachment 113082 [details]
PDF with OpenOffice for comparison

This problem is not fixed in Openoffice but for comparison it is good.
Notice that in line 3 in penultimate word باگ kashida spears inappropriately. But other words are good for comparison.
Comment 17 factoreal 2015-02-03 10:08:25 UTC
Created attachment 113083 [details]
Good justifed document in Libre Version: 4.3.6.1

Hey Alex,
I have uploaded new screenshot of good justified text in Version: 4.3.6.1.
Now you can compare the good and bad one :)
Comment 18 Yousuf Philips (jay) (retired) 2015-02-03 13:16:53 UTC
The problem in this bug is that the text is not being justified for factoreal in 4.4 (attachment 113060 [details]), which was justified in 4.3 (attachment 113083 [details]) on Mac OS X.

@Alex, @foss: What needs to be tested is that the text is justified, meaning that the text is touching both sides of the margin. Please upload screenshots so me and factoreal to see what you see for 4.4 and/or master.

The problem being addressed here isnt the kashida problem with justification that Eman has been trying to identify.
Comment 19 Alex Thurgood 2015-02-03 14:39:03 UTC
Created attachment 113095 [details]
LO4352 screenshot

Screenshot of test document in LO4352 OSX 10.10.2
Comment 20 Alex Thurgood 2015-02-03 14:42:03 UTC
Created attachment 113096 [details]
LO Version: 4.5.0.0.alpha0+

Screenshot of test document in Version: 4.5.0.0.alpha0+ OSX 10.10.2
Comment 21 Alex Thurgood 2015-02-03 14:44:19 UTC
Confirming
Comment 22 Matthew Francis 2015-02-22 14:26:33 UTC
If this works in 4.3.x then it's unfortunately outside the currently available bibisect range for OSX
-> Whiteboard:notBibisectable
Comment 23 Alex Thurgood 2015-09-11 06:03:58 UTC
*** Bug 94101 has been marked as a duplicate of this bug. ***
Comment 24 Alex Thurgood 2015-11-08 11:55:21 UTC
*** Bug 91793 has been marked as a duplicate of this bug. ***
Comment 25 Alex Thurgood 2015-11-08 12:00:50 UTC
*** Bug 95675 has been marked as a duplicate of this bug. ***
Comment 26 Alex Thurgood 2015-11-08 12:02:04 UTC
The problem is still present in 5.0.2.2, as witnessed by the latest duplicate.
Comment 27 Alex Thurgood 2015-11-08 12:07:45 UTC
(In reply to Alex Thurgood from comment #26)


I shall qualify that last comment : the problem **appears** to be still present from the recent duplicates.
Comment 28 Alex Thurgood 2015-11-16 10:19:55 UTC
*** Bug 95820 has been marked as a duplicate of this bug. ***
Comment 29 Buovjaga 2015-11-16 10:54:39 UTC
Giving the priority + severity an alternate spin: highest to let devs know this is a very annoying bug (frequently reported and affects a large user group), severity normal as there is no crash or data loss.
Comment 30 Robinson Tryon (qubit) 2015-12-10 01:26:31 UTC Comment hidden (obsolete)
Comment 31 Robinson Tryon (qubit) 2016-05-12 14:13:38 UTC
TESTING with
LO 5.2.0.0.alpha1+
OS Version: Mac OS X 10.10.5
Build: 2016-05-11_01:01:27

(In reply to Yousuf (Jay) Philips from comment #18)
> The problem in this bug is that the text is not being justified for
> factoreal in 4.4 (attachment 113060 [details]

"Non-Justified Persian text in Libre 4.4.0.3"

> which was justified in 4.3 on Mac OS X.
> (attachment 113083 [details]

"Good justifed document in Libre Version: 4.3.6.1"

> 
> @Alex, @foss: What needs to be tested is that the text is justified, meaning
> that the text is touching both sides of the margin.

The only difference I see with those screenshots is that in both the first and second paragraphs, the first line is left-justified in the 'Good justified document', and is indented in the 'Non-Justified Persian text'

> Please upload
> screenshots so me and factoreal to see what you see for 4.4 and/or master.

Using attachment 113043 [details] as my test document, justification appears similar to the screenshot Jay made in attachment 113070 [details] (comment #5). At first glance, I can't seem to reproduce this bug.

UNFORTUNATELY it appears that both attachment 113060 [details] and attachment 113083 [details] were created using a test document different from the one attached to this bug, so I'm not sure if we're comparing apples and oranges here.

When testing, I noted that LibreOffice is substituting 'Gill Sans' for 'XB Niloofar'. If possible, it'd be great to use a font we ship in LibreOffice in the example/test doc. 

> The problem being addressed here isnt the kashida problem with justification
> that Eman has been trying to identify.

Thanks for the clarification. I'm adding a note to the Summary to make that much clearer.
Comment 32 eisa01 2016-11-06 16:39:55 UTC
Based on screenshots of Alex Thurgood in comment 19 and comment 20 this appears to be fixed for me

Setting as resolved - works for me as the commit that fixed this is unknown

If this is still broken on the original document, please upload a test case that is broken


Version: 5.2.3.3
Build ID: d54a8868f08a7b39642414cf2c8ef2f228f780cf
CPU Threads: 2; OS Version: Mac OS X 10.12; UI Render: default; 
Locale: en-US (en_NO.UTF-8); Calc: group
Comment 33 eisa01 2016-11-06 16:41:40 UTC
Created attachment 128528 [details]
Works for me in LO 5.2.3.3
Comment 34 factoreal 2017-02-13 08:30:12 UTC
hi all
After two years, this bug has not been fixed. I'm using Version: 5.2.5.1
Build ID: 0312e1a284a7d50ca85a365c316c7abbf20a4d22 now, and this bug still exists.
Comment 35 Buovjaga 2017-02-13 08:36:37 UTC
(In reply to factoreal from comment #34)
> hi all
> After two years, this bug has not been fixed. I'm using Version: 5.2.5.1
> Build ID: 0312e1a284a7d50ca85a365c316c7abbf20a4d22 now, and this bug still
> exists.

Please try with 5.3, which has the new font layout engine
Comment 36 dzpreil 2017-02-13 12:21:35 UTC
I've had this problem for years.
Does not manifest in light testing of version 5.3.
Comment 37 eisa01 2017-06-03 16:57:23 UTC
Testing on 5.3 and it seems to work again, as also reported in comment #36

Version: 5.3.0.3
Build ID: 7074905676c47b82bbcfbea1aeefc84afe1c50e1
CPU Threads: 2; OS Version: Mac OS X 10.12.5; UI Render: default; Layout Engine: new; 
Locale: en-US (en_US.UTF-8); Calc: group