Bug 150726 - Wrong rendering of characters for colored Arabic text when enabling "Toggle formatting marks"
Summary: Wrong rendering of characters for colored Arabic text when enabling "Toggle f...
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:7.5.0 target:7.4.3 inReleaseNo...
Keywords:
: 151234 (view as bug list)
Depends on:
Blocks: Font-Rendering Arabic-and-Farsi CTL
  Show dependency treegraph
 
Reported: 2022-08-31 16:10 UTC by Hossein
Modified: 2024-08-04 22:09 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot from Apache OpenOffice 4.1.13 (110.40 KB, image/png)
2022-08-31 21:58 UTC, ⁨خالد حسني⁩
Details
Screenshot from LibreOffice 7.5.0 master (86.50 KB, image/png)
2022-08-31 22:00 UTC, ⁨خالد حسني⁩
Details
After patch (210.99 KB, image/png)
2022-09-25 23:12 UTC, Hossein
Details
Before patch (190.53 KB, image/png)
2022-09-25 23:14 UTC, Hossein
Details
with marks off (18.72 KB, image/png)
2022-09-28 16:49 UTC, Munzir Taha
Details
with marks on (111.93 KB, image/png)
2022-09-28 16:50 UTC, Munzir Taha
Details
Arabic colored text (10.35 KB, application/vnd.oasis.opendocument.text)
2022-09-28 18:16 UTC, Hossein
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hossein 2022-08-31 16:10:31 UTC
Description:
When writing Arabic text, setting color for each glyph leads to wrong placement of diacritics

Steps to Reproduce:
1. Open the attachment 182119 [details] from bug 150724
2. Choose "Toggle formatting marks" from toolbar or press "CTRL+F10"

Actual Results:
Some characters are rendered incorrectly, for example the characters that should be rendered as joined to the others as "medial form" are rendered as the "final form".
https://en.wikipedia.org/wiki/Arabic_alphabet#Letter_forms

Expected Results:
All the characters should be rendered just like the text without coloring

Reproducible: Always

User Profile Reset: Yes

Additional Info:
Reproducible with OpenOffice.org 3.2.1 - OOO320m18 (Build:9502)
https://ftp5.gwdg.de/pub/openoffice/archive/stable/3.2.1/

Reproducible in the latest LO 7.5 Dev master:
Version: 7.5.0.0.alpha0+ / LibreOffice Community
Build ID: fc91d611a231ae6fc498d0ac32944afb72775b95
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 ⁨خالد حسني⁩ 2022-08-31 21:58:31 UTC
Created attachment 182131 [details]
Screenshot from Apache OpenOffice 4.1.13

This is possibly a regression, but I’m not 100% sure. It does not seem to be inherited from OOo, though.
Comment 2 ⁨خالد حسني⁩ 2022-08-31 22:00:02 UTC
Created attachment 182132 [details]
Screenshot from LibreOffice 7.5.0 master
Comment 3 Commit Notification 2022-09-25 13:59:46 UTC
Khaled Hosny committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/092e37a284ea8b8bc1e8dabbbeb001c98012a996

tdf#150726: Pass full string to DrawTextArray() when drawing bullet

It will be available in 7.5.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 4 Hossein 2022-09-25 23:12:34 UTC
Created attachment 182671 [details]
After patch

Tested with the latest LO 7.5 dev master:

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

The problem with the previous document (attachment 182119 [details]) is not reproducible, but now I see another severe problem. Please test with this file:

https://library.aut.ac.ir/wp-content/uploads/2020/06/Projects-Template-Amirkabir-University.doc

In page 2 (and elsewhere) in the document, you will see wrong rendering of some characters when you enable "Toggle formatting marks".
Comment 5 Hossein 2022-09-25 23:14:24 UTC
Created attachment 182672 [details]
Before patch

This is the result from LO 7.4, before the patch:

Version: 7.4.0.3 / LibreOffice Community
Build ID: f85e47c08ddd19c015c0114a68350214f7066f5a
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: fa-IR (en_US.UTF-8); UI: en-US
Calc: threaded

The output was much better.
Comment 6 Commit Notification 2022-09-26 05:54:23 UTC
Khaled Hosny committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6de6231fa9266b64aac87ee3415e4855bbaeec4e

tdf#150726: Fix previous fix

It will be available in 7.5.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 7 Munzir Taha 2022-09-28 16:49:50 UTC
Created attachment 182713 [details]
with marks off

"Toggle Formatting Marks" still renders the colored Arabic text wrongly when enabled. Attached are two screenshots, with marks on, marks off
Comment 8 Munzir Taha 2022-09-28 16:50:31 UTC
Created attachment 182714 [details]
with marks on
Comment 9 Munzir Taha 2022-09-28 17:40:57 UTC
Sorry, the bug is really fixed. I just made a mistake while creating a package for my system and an older version is used instead of the most recent one.
Comment 10 Hossein 2022-09-28 18:16:12 UTC
Created attachment 182716 [details]
Arabic colored text

(In reply to Munzir Taha from comment #7)
> Created attachment 182713 [details]
> with marks off
> 
> "Toggle Formatting Marks" still renders the colored Arabic text wrongly when
> enabled. Attached are two screenshots, with marks on, marks off
I can not reproduce the problem with the above text and color. Please attach a sample.
Comment 11 Hossein 2022-09-28 18:18:01 UTC
Verifying the fix with the latest LO 7.5 dev master, and attachment 182713 [details]:

Version: 7.5.0.0.alpha0+ / LibreOffice Community
Build ID: 27c22bac5439908ecdd1aa05580d75998a5eb058
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 12 ⁨خالد حسني⁩ 2022-10-01 15:47:11 UTC
*** Bug 151234 has been marked as a duplicate of this bug. ***
Comment 13 Commit Notification 2022-10-15 23:53:46 UTC
Khaled Hosny committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/b37764993f7e524dbe2cf79ca921d0b01e6fba97

tdf#150726: Pass full string to DrawTextArray() when drawing bullet

It will be available in 7.4.3.

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

Affected users are encouraged to test the fix and report feedback.