Issue 85074 - X11: wrong display of vocalized justified arabic text
Summary: X11: wrong display of vocalized justified arabic text
Status: CLOSED FIXED
Alias: None
Product: gsl
Classification: Code
Component: code (show other issues)
Version: OOO300m7
Hardware: PC Unix, all
: P2 Trivial (vote)
Target Milestone: OOo 3.1
Assignee: hdu@apache.org
QA Contact: issues@gsl
URL:
Keywords:
: 83220 (view as issue list)
Depends on: 97108
Blocks:
  Show dependency tree
 
Reported: 2008-01-08 10:27 UTC by cemu
Modified: 2009-02-12 12:47 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
misaligned justified arabic text (22.75 KB, image/png)
2008-01-08 10:36 UTC, cemu
no flags Details
correct arabic text (not justified) (20.53 KB, image/png)
2008-01-08 10:37 UTC, cemu
no flags Details
odt-file example of justified arabic text (8.80 KB, application/vnd.sun.xml.writer)
2008-01-08 10:54 UTC, cemu
no flags Details
arabic font (109.86 KB, application/octet-stream)
2008-01-08 10:59 UTC, cemu
no flags Details
arabic text correct justified under windows (15.20 KB, image/png)
2008-01-08 17:03 UTC, cemu
no flags Details
comparision between vocalized and nonvocalized justified arabic linux (47.81 KB, image/png)
2008-01-09 12:27 UTC, cemu
no flags Details
ODT-File: comparision vocalized and unvocalized arabic text (8.21 KB, application/vnd.oasis.opendocument.text)
2008-01-09 14:09 UTC, cemu
no flags Details
PDF export (WinXP) Sheherazade (33.56 KB, application/pdf)
2008-12-12 14:19 UTC, hennerdrewes
no flags Details
PDF export (WinXP) Arial (37.30 KB, application/pdf)
2008-12-12 14:20 UTC, hennerdrewes
no flags Details
screenshot on UNX with CWS kashidafix+i97108fix and improved cluster handling (73.56 KB, image/png)
2008-12-12 16:13 UTC, hdu@apache.org
no flags Details
screenshot on UNX with CWS kashidafix+i97108fix and improved cluster handling with "La" (لا) displacment (67.85 KB, image/png)
2009-02-05 19:16 UTC, cemu
no flags Details
screenshot on UNX with CWS kashidafix+i97108fix and improved cluster handling with "La" (لا) and "wa ila" (وإلى) displacment (72.43 KB, image/png)
2009-02-05 19:32 UTC, cemu
no flags Details
screenshot on UNX with CWS kashidafix02 (60.08 KB, image/png)
2009-02-06 07:49 UTC, hdu@apache.org
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description cemu 2008-01-08 10:27:47 UTC
Arabic justified text is misaligned in writers linux versions. when i knew how 
to do attatchments here I will put some screenshots and some text abaout
Comment 1 cemu 2008-01-08 10:36:00 UTC
Created attachment 50730 [details]
misaligned justified arabic text
Comment 2 cemu 2008-01-08 10:37:05 UTC
Created attachment 50731 [details]
correct arabic text (not justified)
Comment 3 cemu 2008-01-08 10:49:09 UTC
I attatced 2 screenshots of the pdf-export: In 
attachment "arabicjustifiedtext.png" you can see the misalignements in the red 
circles. The second attachment "arabictext.png" you can see the same text in 
its correct form without being justified.

These misalignments are only under linux and macos (neooffice), not under 
windows (but there are other problems). I'am using the native openoffice 2.3.1 
german version under debian etch with enabled Complex Text Layout.

For arabic scripts I'am using the Scheherazade-Font from scripts.sil.org, but 
with other fonts there is the same problem. I think the "main poblem" are the 
vocalizations like shadda, damma, kasra etc. (e.g. the little lines above and 
under the letters). When deleting some of them the misalignments moving throw 
the text.

When you have further questions please contact me, also when you cannot read 
my english and want it in german ;-)

Thank you.
Comment 4 cemu 2008-01-08 10:54:31 UTC
Created attachment 50732 [details]
odt-file example of justified arabic text
Comment 5 cemu 2008-01-08 10:59:04 UTC
Created attachment 50733 [details]
arabic font
Comment 6 michael.ruess 2008-01-08 13:16:06 UTC
MRU->HDU: see attached document (and ttf font). It looks, that the justification
of Arabic text on Linux is slightly wrong. IME the space characters are smaller
than on Windows (cemu, please correct me for the case I am wrong, thanks!). 
Comment 7 michael.ruess 2008-01-08 13:17:14 UTC
*** Issue 83220 has been marked as a duplicate of this issue. ***
Comment 8 cemu 2008-01-08 17:03:13 UTC
Created attachment 50741 [details]
arabic text correct justified under windows
Comment 9 cemu 2008-01-08 17:14:57 UTC
In file "arabictextwinstretched.png" is an example of the correct justification
mechanism in the windows version.
Arabic text is not justified by stretching the space caracters, its justified by
making the words longer. When making the words longer there will be inserted
some "unnamed thing" like in the red circles between some letters in the
attached file. And maybe this makes the problems under linux together with the
vocalization. I do not know if the space letters smaller or not.
Comment 10 hdu@apache.org 2008-01-09 09:50:29 UTC
Use Format->Character to set the text language to Arabic in order to get kashida justification with todays 
OOo. Future versions of OOo Writer will do the justification depending on the automatically detected script 
type. See issue 28203 for details. 

Use Tools->Options->Languages to set the language to Arabic for "complex text layouted". For new text 
this voids the need to set the language manually it via the Format->Character dialog.

For other CTL text related justification for BiDi scripts see issue 77976.

*** This issue has been marked as a duplicate of 28203 ***
Comment 11 cemu 2008-01-09 12:17:06 UTC
Thank you, but I'am sorry to tell you setting the language options to arabic 
and also the character formatting does not help. It shows that this only helps 
when using no vocalization marks like in the screenshots from issue 28203, but 
not in my case (and/or with my OO version?), because I have over nearly every 
letter such vocal markings.
I testet my file without the vocal markings and it works well (justification 
corrct), but with vocal marking no chance (misaligned justification) :-/
Comment 12 cemu 2008-01-09 12:27:34 UTC
Created attachment 50757 [details]
comparision between vocalized and nonvocalized justified arabic linux
Comment 13 hdu@apache.org 2008-01-09 13:49:04 UTC
@cemu: Great illustration of the problem, thanks! => accepting
I'm afraid this needs a looong debug session.
Comment 14 cemu 2008-01-09 14:01:57 UTC
Thank you for accepting :), but I am think the debug session may be not so 
long, in the windows version this problem don't exist (there the justification 
is with and without vocalization correct), but under windows there is another 
problem (see issue 85089).
Comment 15 cemu 2008-01-09 14:09:41 UTC
Created attachment 50760 [details]
ODT-File: comparision vocalized and unvocalized arabic text
Comment 16 hdu@apache.org 2008-01-11 11:52:02 UTC
The debug session will be long: On windows the Uniscribe engine handles layout and justification, on unix 
ICU handles layout but does not implement justification, so OOo has to do it itself. The bug with kashida 
justified vocalized text is exactly in that area, where even good layout engines don't like to venture, even 
though they specialize in the layout topic...
Comment 17 cemu 2008-09-27 07:53:21 UTC
This bug is also in the 3.0 RC2 version of Openoffice unfixed (posted from
version 2.4.1).

Additionaly I think this bug should become a priority P2 (and target milestone
OOo 3.1), because arabic is one of the six international languages supported by
the United Nations, and for example an uncomplete language support will make it
impossible to replace Microsoft Office in really international environments and
e.g. in the arabic, urdu and farsi speeking world. (At this time I can not
recommened OpenOffice to someone who needs bidi language features and I must
refer unfortunately!! to MS-Office and Windows-OS)

Thank you very much indeed.
Comment 18 hdu@apache.org 2008-12-10 15:06:16 UTC
I split off issue 97108 for Writer using the wrong justification method for vocalized text.

The remainder of this issue is that justified arabic text should look on X11 platforms as it looks on other 
platforms. I updated the issue summary accordingly.
Comment 19 hennerdrewes 2008-12-12 14:18:33 UTC
@hdu: Could you please post current screenshots for this issue with current
kashidafix builds?

Unfortunately, I still haven't tried to build OOo on Linux yet (: , and probably
this won't happen very soon.

But still I might have some useful thoughts: First of all, I did an (WinXP) PDF
export from the bugdoc of issue 97108. First of all, I almost fainted. Kashidas
all over the place, but not where they belong. Then I changed the font back to
Arial, and everything looked fine. (Relief) 

The kashida glyphs seem to jump on the y-Axis, which can be noticed also in the
old screenshots of this issue. So probably you'll have to split this issue once
more: 

1. Remaining X11 kashida problems (maybe also for non-vocalized text)
2. Sheherazade font specific issues (also other platforms, when doing glyph
injection)

Attaching the PDFs...
Comment 20 hennerdrewes 2008-12-12 14:19:43 UTC
Created attachment 58772 [details]
PDF export (WinXP) Sheherazade
Comment 21 hennerdrewes 2008-12-12 14:20:56 UTC
Created attachment 58773 [details]
PDF export (WinXP) Arial
Comment 22 hdu@apache.org 2008-12-12 16:00:51 UTC
> Could you please post current screenshots for this issue with current (UNX/X11) kashidafix builds?

When working on this I already found several problems in our UNX platforms cluster handling for these 
complex cases. E.g. in RTL contexts the vocalization glyphs were assigned to the left consonant instead 
of the right, where they seem to belong. Fixing all this ICU+OOo+RTL interaction without breaking any 
of the other CTL scripts is the main task of this issue.

> The kashida glyphs seem to jump on the y-Axis

This seems to happen when the kashida glyph is positioned relative to the wrong glyph, which in the 
current problem case is a vocalization glyph. On the UNX platform this should be fixed by the improved 
handling of glyph clusters mentioned above, for the USP case we can probably fix it by tweaking 
UniscribeLayout::GetNextGlyphs() to use the proper base glyph. Separating that second task into an 
own issue is a good idea.

I plan to open a new CWS as soon as CWS kashidafix is integrated into a released MWS.
Comment 23 hdu@apache.org 2008-12-12 16:13:46 UTC
Created attachment 58783 [details]
screenshot on UNX with CWS kashidafix+i97108fix and improved cluster handling
Comment 24 hennerdrewes 2008-12-12 16:27:51 UTC
@hdu: looks nice...

The switching of the extra justification width to the vowel glyph I'd done for
usp puzzled me, and I thought that probably something similar is needed for this
case. You probably covered that now with the cluster handling. 
Comment 25 hdu@apache.org 2009-01-19 11:27:29 UTC
Fixed in CWS kashidafix02.
Comment 26 cemu 2009-02-05 19:14:38 UTC
Looks very well :-), but I found an error in the screenshot. I marked it in the next attachment. The
position of "la" (لا) is not correct, its too much left (red line). It must be above the green line is.
"La" is merged from the to letters alif and lam (a + l = la).

I don't see the bug earlier and I do not know if the issue is to reopen or this is a new problem and
needs a new issue.

It is possible to download somewhere an OOO development version with kashidafix for testing?

Thank you.
Comment 27 cemu 2009-02-05 19:16:41 UTC
Created attachment 59970 [details]
screenshot on UNX with CWS kashidafix+i97108fix and improved cluster handling with "La" (لا) displacment
Comment 28 cemu 2009-02-05 19:30:54 UTC
I found another error in the screenshot, one letter upon the other. Look in the orange circles in the
next attachment. In the word "wa ila" (وإلى) the 2nd (Alif with hamza) and the 3rd (Lam) letter
are upon the other. The "word" has 4 letters.

I think its best to reopen the bug.
Comment 29 cemu 2009-02-05 19:32:17 UTC
Created attachment 59971 [details]
screenshot on UNX with CWS kashidafix+i97108fix and improved cluster handling with "La" (لا) and "wa ila" (وإلى) displacment
Comment 30 hdu@apache.org 2009-02-06 07:49:13 UTC
Created attachment 59979 [details]
screenshot on UNX with CWS kashidafix02
Comment 31 hdu@apache.org 2009-02-06 07:59:17 UTC
@cemu: thanks for checking. The issue you highlighted in unx_current_2.png is already fixed and I'm quite 
sure the other one in unx_current_3.png also looks much better. Please see my latest attached screenshot. 

The CWS kashidafix02, which has all these fixes is about to be integrated and the next milestone 
announced on http://blogs.sun.com/gullfoss/ should have it. Please test it once it becomes available. If 
you find remaining problems there please file new issues for them instead of reopening this one. Once the 
changes for an issue got into the code trunk appending new aspects of the problem to the old issue 
makes work quite more difficult.
Comment 32 hdu@apache.org 2009-02-06 08:33:06 UTC
Setting issue status back to latest status in CWS 
(http://wiki.services.openoffice.org/wiki/ChildWorkSpace#The_Process_Flow *16)
Comment 33 hdu@apache.org 2009-02-12 12:47:42 UTC
Got into OOO310_m1 with CWS kashidafix02. Closing.