Issue 49343

Summary: justified text in arabic script inserts random underscore characters
Product: Writer Reporter: farzaneh
Component: formattingAssignee: stefan.baltzer
Status: CLOSED IRREPRODUCIBLE QA Contact: issues@sw <issues>
Severity: Trivial    
Priority: P3 CC: issues, smokey.ardisson
Version: OOo 2.0 Beta   
Target Milestone: ---   
Hardware: PC   
OS: Linux, all   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Issue Depends on:    
Issue Blocks: 96765    
Attachments:
Description Flags
Justified arabic text with kashidas highlighted in yellow
none
arabic text with inappropriate justification. screenshot.
none
the same document of the previous screenshot, produced by oowriter. none

Description farzaneh 2005-05-16 14:25:09 UTC
In documents written in the Arabic script, 'justify' formatting tool works
incorrectly. instead of justifying the text, random underscore characters are
inserted through the line to achieve equal line length.
Comment 1 michael.ruess 2005-05-17 08:23:06 UTC
Reassigned to SBA.
Comment 2 stefan.baltzer 2005-05-17 18:07:21 UTC
SBA->farzanehs: In Arabic, the justification is made with so-called "Kashidas".
These connect lcertain arabic letters and they look "a little" like underscores. 
Justification "by space enlargement" is not common in Arabic.

I will attach a .pdf file exported from OOo on Linux. The yellow maked places
show what kashidas should look like.
Since this works in general, I set this one as "WORKSFORME"

If you have somewhat different findings, please attach both a screen shot (to
show your  problem) AND the document you used (to reproduce the problem and
verify a fix). Please also tell more about the system (what Linux, window
manager and what exact version of OOo) you used. 
Note that OOo Beta was Build 1.9.78 and meanwhile we're working on 1.9.104 - so
a verification in a younger build always makes sense.

Please comment
Comment 3 stefan.baltzer 2005-05-17 18:10:04 UTC
Created attachment 26242 [details]
Justified arabic text with kashidas highlighted in yellow
Comment 4 farzaneh 2005-05-18 11:48:44 UTC
hi SBA,
as you said about kashidas, they should connect "certain" characters. in older
versions of OOo it used to insert those kashidas randomly. now they're inserted
in between the words, looking like space enlargement. (i will attach a
screenshot of the same text in OOo writer, with the document itself to help you
reproduce.)
I am currently using:
fedora core 4 test 3 fully updated as in may 18th
GNOME 2.10.0
openoffice.org-writer-1.9.100-1

if you had more questions, please do not hesitate to ask.
Comment 5 farzaneh 2005-05-18 11:55:10 UTC
Created attachment 26269 [details]
arabic text with inappropriate justification. screenshot.
Comment 6 farzaneh 2005-05-18 11:59:31 UTC
Created attachment 26270 [details]
the same document of the previous screenshot, produced by oowriter.
Comment 7 sardisson 2005-06-04 16:57:16 UTC
I can reproduce this behavior in m102 on Mac OS X 10.3.9 (the latest available
build that runs).  

Where the "kashidas run amok" appear varies depending on the font and size
selected.  The situation is even worse in voweled texts, where the presence of a
vowel on the final letter of a word also causes a misplaced kashida (again,
where they appear depends on the font and size)...
Comment 8 stefan.baltzer 2005-08-22 13:05:48 UTC
SBA: The text content of that document has the language "Farsi" set. If you set
the character attribute "language" correctly (to Arabic), the Kashidas look good.
To do so, the support of CTL (Complex Text Layout) must be enabled (only once,
this setting will stay set at future Office sessions):
 - Tools-Options-Language settings-Languages -> check "CTL support", OK

Now the language attribute for CTL text can be set.
The "Quick and dirty (sorry)" solution is to hard-set this:
 - Select the entire text
 - Format-Character-Font
 - Set "Arabic" for CTL text, OK

The better solution is to set this in the "Default" paragraph style for that
document:
 - Put the cursor in the text
 - Context menu: "edit paragraph style"
 - In the upcoming paragraph style, set the appropriate languages (i.e. "English
(USA)" for Western text and "Arabic (Egypt) for CTL text.
 - OK

-> Now the Kashidas look good an an English text within that document would have
a language set, too (otherwise the spellchecker would not consider English text
as such and thus not work".

-> Set to "Worksforme".
Comment 9 stefan.baltzer 2005-08-30 09:59:13 UTC
SBA: Closed.
Comment 10 farzaneh 2005-09-17 20:19:21 UTC
Kashidas work fine with Arabic set as language, but not with Persian (i.e.
Farsi.) The problem is still there with Persian, and the "workaround" is
changing the language to Arabic.
N.B. Persian is written in the Arabic script.
Comment 11 constencate 2010-10-23 15:47:10 UTC
Created attachment 72703