Bug 116344 - Writer, CTL/RIGHT-TO-LEFT: Awkward Justification with Syriac Fonts
Summary: Writer, CTL/RIGHT-TO-LEFT: Awkward Justification with Syriac Fonts
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: ⁨خالد حسني⁩
URL:
Whiteboard: target:6.1.0
Keywords:
: 117907 (view as bug list)
Depends on:
Blocks: RTL-CTL Font-Rendering Kashida-Justification
  Show dependency treegraph
 
Reported: 2018-03-10 21:04 UTC by Ludwig Meier
Modified: 2022-08-11 18:05 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Example, otf-file (15.38 KB, application/vnd.oasis.opendocument.text)
2018-03-10 21:05 UTC, Ludwig Meier
Details
Example, exported to pdf (19.95 KB, application/pdf)
2018-03-10 21:06 UTC, Ludwig Meier
Details
example, awkward whitespace marked red (197.29 KB, image/jpeg)
2018-03-10 21:07 UTC, Ludwig Meier
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ludwig Meier 2018-03-10 21:04:16 UTC
Description:
Writer inserts awkward black lines when stretching whitespace for justified right-to-left-text in Classical Syriac. Happens in 5.4 and 6.02.

Steps to Reproduce:
1. If you are not familiar with Classical Syriac, install Google’s noto-fonts (e.g. sudo apt-get install fonts-noto). Of course, any other Syriac font will do.
2. Enable Complex Text Layout (Tools > Options > Language Settings > Complex Text Layout; Language: "None", there is no option for Ancient Syriac)
3. Create paragraph style (e.g. "Syriac_Justified") with options: "Justify + Text direction right-to-left (horizontal) + Last Line justified.
Select "Noto Sans Syriac Estrangela" as CTL-font.
4. Add some Syriac Text and mark it as "Syriac_Justified".

Actual Results:  
Stretched whitespace with black lines.

Expected Results:
Stretched whitespace should be white.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Version: 6.0.2.1
Build ID: 1:6.0.2~rc1-0ubuntu0.17.10.1~lo1
CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: gtk3; 
Locale: de-DE (de_DE.UTF-8); Calc: group


User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:58.0) Gecko/20100101 Firefox/58.0
Comment 1 Ludwig Meier 2018-03-10 21:05:47 UTC
Created attachment 140558 [details]
Example, otf-file
Comment 2 Ludwig Meier 2018-03-10 21:06:33 UTC
Created attachment 140559 [details]
Example, exported to pdf
Comment 3 Ludwig Meier 2018-03-10 21:07:40 UTC
Created attachment 140560 [details]
example, awkward whitespace marked red
Comment 4 Buovjaga 2018-03-13 12:31:14 UTC
(In reply to Ludwig Meier from comment #3)
> Created attachment 140560 [details]
> example, awkward whitespace marked red

For the first paragraph, I confirm the problem, *but* the third and fourth lines for me do not have the extra black lines.

Arch Linux 64-bit
Version: 6.0.2.1.0+
Build ID: 6.0.2-1
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Comment 5 Ludwig Meier 2018-03-13 13:01:14 UTC
Dear Buovjaga,
thanks a lot for replying.
In the second line there seem to be no black lines indeed, but the third and fourth line do show the error as well. For example, compare "b-mdbr)" (first word, l. 3) with the same word in the third paragraph (l. 3): The Aleph has an additional black line at the baseline. This is the reason why I added some additional line breaks in the second paragraph, to show that any word seems to be affected by this problem.
Comment 6 ⁨خالد حسني⁩ 2018-03-13 14:23:30 UTC
That is a result from trying to do Kashida justification for Syriac (like Arabic), but without actually calculating proper Kashida insertion places and inserting it in the expanded word spaces. Simplest fix is not not do Kashida justification for Syriac, but a more through fix is to figure Syriac Kashida insertion logic and properly apply it. I’m going with the former for now.
Comment 7 Commit Notification 2018-03-13 17:05:54 UTC
Khaled Hosny committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=ae0a3825f5ad06ff8d6ae3cb388e215d8abe2eb7

tdf#116344: Don’t Kashida justify Syriac text

It will be available in 6.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Ludwig Meier 2018-03-16 19:16:50 UTC
(In reply to Khaled Hosny from comment #6)
> That is a result from trying to do Kashida justification for Syriac (like
> Arabic), but without actually calculating proper Kashida insertion places
> and inserting it in the expanded word spaces. Simplest fix is not not do
> Kashida justification for Syriac, but a more through fix is to figure Syriac
> Kashida insertion logic and properly apply it. I’m going with the former for
> now.

Dear Khaled, built from source and tested, works fine. Thanks a lot!
Comment 9 V Stuart Foote 2018-06-21 19:39:10 UTC
*** Bug 117907 has been marked as a duplicate of this bug. ***