Re: Help with Arabic computers

From: Martin Sevior <msevior_at_gmail.com>
Date: Wed Dec 17 2008 - 07:09:28 CET

Hi Marc,
           Actually I think the bug is in the template files for
arabic and other RTL languages. We explicitly set the text aligned to
be left-aligned. The formatter needs to honour this request even for
RTL languages because one can easily think of use cases where a RTL
user wants to put text on the left side the document, like English
speakers have the need for right-aligned text.

Here is the template for normal.awt-ar (Arabic locale)

------------------------------
<styles>
<s type="P" name="Normal" basedon="" followedby="Current Settings"
props="font-family:Times New Roman; margin-top:0pt;
font-variant:normal; margin-left:0pt; text-indent:0in; widows:2;
font-style:normal; font-weight:normal; text-decoration:none;
color:000000; line-height:1.0; text-align:left; margin-bottom:0pt;
text-position:normal; margin-right:0pt; bgcolor:transparent;
font-size:12pt; font-stretch:normal"/>
</styles>
<pagesize pagetype="A4" orientation="portrait" width="210.000000"
height="297.000000" units="mm" page-scale="1.000000"/>
<section props="page-margin-right:1.0000in;
page-margin-footer:0.5000in; page-margin-header:0.5000in;
page-margin-left:1.0000in; page-margin-top:1.0000in;
page-margin-bottom:1.0000in">
<p style="Normal"></p>
</section>
</abiword>
------------------------------------

See "text-align:left;" ? We explicitly ask for left-alignment even
though we set the dominant direction to RTL.

The solution is straight forward change the templates to set the
property: "text-align:right;" for normal style. Since almost all our
styles are basedon normal, the styles will inherit right-alignment as
default.

Tomas, do you have an opinion?

Cheers

Martin

On Thu, Dec 4, 2008 at 9:18 PM, J.M. Maurer <uwog@uwog.net> wrote:
>
> On Thu, 2008-12-04 at 10:43 +1100, Martin Sevior wrote:
>>
>> You also need to set the paragraph property of the template to be
>> right aligned. That will put the caret on the right side the screen.
>
> Try it yourself using "LANG=ar_AE.utf8 abiword". Either I don't
> understand how RtL languages work, or we broke its behavior (I bet on
> the latter).
>
> Arabic speaking people, could you test the following for me:
>
> 1) start abiword on a "normal PC" using LANG=ar_AE.utf8 abiword
> 2) right align the paragraph (Format -> Align -> Right)
> 3) type some words, and see if it behaves normally (cursor movement,
> letter placement, inserting a space)?
>
> @Martin: we never needed to manually right align afaict. Sure, I can
> make it part of the Normal style for arabic, but that means it breaks
> all down again as soon as you use anything other than Normal (ie. one of
> the built-in styles). I'm fairly sure we broke this. It should
> auto-right align imo, and I think we used to do that.
>
> Cheers!
> Marc
>
>
Received on Wed Dec 17 07:09:36 2008

This archive was generated by hypermail 2.1.8 : Wed Dec 17 2008 - 07:09:37 CET