Skip to main content



      Home
Home » Eclipse Projects » GEF » RTL and bidi behavior
RTL and bidi behavior [message #172885] Mon, 21 March 2005 18:58 Go to next message
Eclipse UserFriend
I am investigating right-to-left and bidi support in GEF 3.1M5, and have
encountered strange displaying of text for RTL languages in the Logic
editor. The workbench and GEF itself provide a couple of places to specify
the orientation, and depending on the combination, the RTL text is displayed
differently. With this post I hope to find out how to set the orientation
correctly, and possibly to expose any bidi bugs in GEF.

The phrase I want to display is:
"cost: 25 (USD)".

In an RTL language, the phrase SHOULD appear as (assuming we don't translate
currency):
"(USD) 25 :<rtl text>"

I ran the eclipse workbench in RTL mode by passing in the "-dir rtl" program
argument. This basically mirrors the entire workbench, except for
editors...this is because org.eclipse.ui.part.EditorPart always returns LTR
in its getOrientation() method. In the Logic editor, I override this method
to return the orientation depending on the case.

In addition, the class BlockFlow has a method setOrientation to specify LTR
or RTL. I set the FlowPage (subclass of BlockFlow) orientation in the
StickyNoteFigure class.

With the LogicEditor.getOrientation and BlockFlow.setOrientation methods we
have 4 possible combinations. I entered the RTL language version of the
"cost: 25 (USD)" phrase in a Logic editor label, and saw the following
output:
-----------------------------------
case 1: incorrect
EditorPart.getOrientation = LTR
BlockFlow orientation = LTR
"25 :<rtl text> (USD)"

-----------------------------------
case 2: correct
EditorPart.getOrientation = LTR
BlockFlow orientation = RTL
"(USD) 25 :<rtl text>"

-----------------------------------
case 3: incorrect
EditorPart.getOrientation = RTL
BlockFlow orientation = LTR
"(USD) <rtl text> :25"

-----------------------------------
case 4: incorrect
EditorPart.getOrientation = RTL
BlockFlow orientation = RTL
"<rtl text> :25) USD("
-----------------------------------

Case 1 seems to be using LTR text layout rules, treating the colon and
number 25 as part of the rtl word.
Case 2 is the only correct scenario.
Case 3 uses some strange ordering.
Case 4 text layout is bizarre.

FYI, in another editor I'm developing in GEF 3.0, I'm using a draw2d.Label
that displays the text correctly simply by using a graphics object that has
its GC style bit set to RTL.
Re: RTL and bidi behavior [message #172983 is a reply to message #172885] Tue, 22 March 2005 09:54 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

This is a multi-part message in MIME format.

------=_NextPart_000_0049_01C52EC5.229D3410
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

> -----------------------------------
> case 1: incorrect
> EditorPart.getOrientation =3D LTR
> BlockFlow orientation =3D LTR
> "25 :<rtl text> (USD)"

Why is this incorrect? should it be:
<rtl text>: 25 (USD)
?
=20
> -----------------------------------
> case 2: correct
> EditorPart.getOrientation =3D LTR
> BlockFlow orientation =3D RTL
> "(USD) 25 :<rtl text>"

Good, this is the only case we have tested.

> -----------------------------------
> case 3: incorrect
> EditorPart.getOrientation =3D RTL
> BlockFlow orientation =3D LTR
> "(USD) <rtl text> :25"

You are seeing mirrored, LTR text. Currently we are not expecting =
mirroring to be enabled.

>=20
> -----------------------------------
> case 4: incorrect
> EditorPart.getOrientation =3D RTL
> BlockFlow orientation =3D RTL
> "<rtl text> :25) USD("
> -----------------------------------
You are seeing mirrored RTL text. The text is being drawn in fragments, =
which are arranged RTL, but then SWT flip-flops the locations to their =
mirrored positions, giving the the above result. We are working on =
supporting this case.

> Case 1 seems to be using LTR text layout rules, treating the colon and
> number 25 as part of the rtl word.
> Case 2 is the only correct scenario.
> Case 3 uses some strange ordering.
> Case 4 text layout is bizarre.
4 should be simple to fix. I'm still worred about 1 though. If 1 is =
working and 4 is fixed, then 3 will work too.

------=_NextPart_000_0049_01C52EC5.229D3410
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2604" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>&gt; =
-----------------------------------<BR>&gt;=20
case 1: incorrect<BR>&gt; EditorPart.getOrientation =3D LTR<BR>&gt; =
BlockFlow=20
orientation =3D LTR<BR>&gt; "25 :&lt;rtl text&gt; (USD)"</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Why is this incorrect?&nbsp;should it=20
be:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&lt;rtl text&gt;: 25 (USD)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>?<BR>&nbsp;<BR>&gt;=20
-----------------------------------<BR>&gt; case 2: correct<BR>&gt;=20
EditorPart.getOrientation =3D LTR<BR>&gt; BlockFlow orientation =3D =
RTL<BR>&gt;=20
"(USD) 25 :&lt;rtl text&gt;"</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Good, this is the only case we have=20
tested.</FONT></DIV>
<DIV><BR><FONT face=3DArial size=3D2>&gt;=20
-----------------------------------<BR>&gt; case 3: incorrect<BR>&gt;=20
EditorPart.getOrientation =3D RTL<BR>&gt; BlockFlow orientation =3D =
LTR<BR>&gt;=20
"(USD) &lt;rtl text&gt; :25"</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>You are seeing mirrored, LTR =
text.&nbsp; Currently=20
we are not expecting mirroring to be enabled.</FONT></DIV>
<DIV><BR><FONT face=3DArial size=3D2>&gt; <BR>&gt;=20
-----------------------------------<BR>&gt; case 4: incorrect<BR>&gt;=20
EditorPart.getOrientation =3D RTL<BR>&gt; BlockFlow orientation =3D =
RTL<BR>&gt;=20
"&lt;rtl text&gt; :25) USD("<BR>&gt;=20
-----------------------------------</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>You are seeing mirrored RTL text.&nbsp; =
The text is=20
being drawn in fragments, which are arranged RTL, but then SWT =
flip-flops the=20
locations to their mirrored positions, giving the the above =
result.&nbsp; We are=20
working on supporting this case.</FONT></DIV>
<DIV><BR><FONT face=3DArial size=3D2>&gt; Case 1 seems to be using LTR =
text layout=20
rules, treating the colon and<BR>&gt; number 25 as part of the rtl =
word.<BR>&gt;=20
Case 2 is the only correct scenario.<BR>&gt; Case 3 uses some strange=20
ordering.<BR>&gt; Case 4 text layout is bizarre.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>4 should be simple to fix.&nbsp; I'm =
still worred=20
about 1 though.&nbsp; If 1 is working and 4 is fixed, then 3 will work=20
too.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_0049_01C52EC5.229D3410--
Re: RTL and bidi behavior [message #173193 is a reply to message #172983] Tue, 22 March 2005 23:32 Go to previous messageGo to next message
Eclipse UserFriend
This is a multi-part message in MIME format.

------=_NextPart_000_0085_01C52F37.70BB7F90
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Case 1 is correct behaviour. I've verified that TextLayout does the =
same.
"Randy Hudson" <none@us.ibm.com> wrote in message =
news:d1pgb8$tv4$1@news.eclipse.org...
> -----------------------------------
> case 1: incorrect
> EditorPart.getOrientation =3D LTR
> BlockFlow orientation =3D LTR
> "25 :<rtl text> (USD)"

Why is this incorrect? should it be:
<rtl text>: 25 (USD)
?
=20
> -----------------------------------
> case 2: correct
> EditorPart.getOrientation =3D LTR
> BlockFlow orientation =3D RTL
> "(USD) 25 :<rtl text>"

Good, this is the only case we have tested.

> -----------------------------------
> case 3: incorrect
> EditorPart.getOrientation =3D RTL
> BlockFlow orientation =3D LTR
> "(USD) <rtl text> :25"

You are seeing mirrored, LTR text. Currently we are not expecting =
mirroring to be enabled.

>=20
> -----------------------------------
> case 4: incorrect
> EditorPart.getOrientation =3D RTL
> BlockFlow orientation =3D RTL
> "<rtl text> :25) USD("
> -----------------------------------
You are seeing mirrored RTL text. The text is being drawn in =
fragments, which are arranged RTL, but then SWT flip-flops the locations =
to their mirrored positions, giving the the above result. We are =
working on supporting this case.

> Case 1 seems to be using LTR text layout rules, treating the colon =
and
> number 25 as part of the rtl word.
> Case 2 is the only correct scenario.
> Case 3 uses some strange ordering.
> Case 4 text layout is bizarre.
4 should be simple to fix. I'm still worred about 1 though. If 1 is =
working and 4 is fixed, then 3 will work too.

------=_NextPart_000_0085_01C52F37.70BB7F90
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1491" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Case 1 is correct behaviour.&nbsp; =
</FONT><FONT=20
face=3DArial size=3D2>I've verified that TextLayout does the =
same.</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Randy Hudson" &lt;<A=20
href=3D"mailto:none@us.ibm.com">none@us.ibm.com</A>&gt; wrote in =
message <A=20
=
href=3D"news:d1pgb8$tv4$1@news.eclipse.org">news:d1pgb8$tv4$1@news.eclips=
e.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>&gt; =
-----------------------------------<BR>&gt;=20
case 1: incorrect<BR>&gt; EditorPart.getOrientation =3D LTR<BR>&gt; =
BlockFlow=20
orientation =3D LTR<BR>&gt; "25 :&lt;rtl text&gt; (USD)"</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Why is this incorrect?&nbsp;should it =

be:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&lt;rtl text&gt;: 25 =
(USD)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>?<BR>&nbsp;<BR>&gt;=20
-----------------------------------<BR>&gt; case 2: correct<BR>&gt;=20
EditorPart.getOrientation =3D LTR<BR>&gt; BlockFlow orientation =3D =
RTL<BR>&gt;=20
"(USD) 25 :&lt;rtl text&gt;"</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Good, this is the only case we have=20
tested.</FONT></DIV>
<DIV><BR><FONT face=3DArial size=3D2>&gt;=20
-----------------------------------<BR>&gt; case 3: incorrect<BR>&gt;=20
EditorPart.getOrientation =3D RTL<BR>&gt; BlockFlow orientation =3D =
LTR<BR>&gt;=20
"(USD) &lt;rtl text&gt; :25"</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>You are seeing mirrored, LTR =
text.&nbsp;=20
Currently we are not expecting mirroring to be enabled.</FONT></DIV>
<DIV><BR><FONT face=3DArial size=3D2>&gt; <BR>&gt;=20
-----------------------------------<BR>&gt; case 4: incorrect<BR>&gt;=20
EditorPart.getOrientation =3D RTL<BR>&gt; BlockFlow orientation =3D =
RTL<BR>&gt;=20
"&lt;rtl text&gt; :25) USD("<BR>&gt;=20
-----------------------------------</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>You are seeing mirrored RTL =
text.&nbsp; The text=20
is being drawn in fragments, which are arranged RTL, but then SWT =
flip-flops=20
the locations to their mirrored positions, giving the the above =
result.&nbsp;=20
We are working on supporting this case.</FONT></DIV>
<DIV><BR><FONT face=3DArial size=3D2>&gt; Case 1 seems to be using LTR =
text layout=20
rules, treating the colon and<BR>&gt; number 25 as part of the rtl=20
word.<BR>&gt; Case 2 is the only correct scenario.<BR>&gt; Case 3 uses =
some=20
strange ordering.<BR>&gt; Case 4 text layout is bizarre.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>4 should be simple to fix.&nbsp; I'm =
still worred=20
about 1 though.&nbsp; If 1 is working and 4 is fixed, then 3 will work =

too.</FONT></DIV>
<DIV><FONT face=3DArial =
size=3D2></FONT>&nbsp;</DIV></BLOCKQUOTE></BODY></HTML >

------=_NextPart_000_0085_01C52F37.70BB7F90--
Re: RTL and bidi behavior [message #173373 is a reply to message #173193] Wed, 23 March 2005 18:57 Go to previous messageGo to next message
Eclipse UserFriend
You're right that case 1 is showing the phrase correctly. Thinking back on
what I wrote, what I really meant as "correct" behavior is that the RTL
phrase appear properly in RTL mode. Of course with case 1, with everything
set to LTR, the text is displayed using LTR layout.

Once GEF RTL and bidi development is working 100%, is it correct to say the
following?
With the 4 cases below, we will see only two different results. Regardless
of the EditorPart orientation, the text will be one of the following based
only on the BlockFlow orientation:

BLockFlow orientation = LTR
"25 :<rtl text> (USD)"

BLockFlow orientation = RTL
"(USD) 25 :<rtl text>"

thanks

"Pratik Shah" <ppshah@us.ibm.com> wrote in message
news:d1r09o$sm9$1@news.eclipse.org...
Case 1 is correct behaviour. I've verified that TextLayout does the same.
"Randy Hudson" <none@us.ibm.com> wrote in message
news:d1pgb8$tv4$1@news.eclipse.org...
> -----------------------------------
> case 1: incorrect
> EditorPart.getOrientation = LTR
> BlockFlow orientation = LTR
> "25 :<rtl text> (USD)"

Why is this incorrect? should it be:
<rtl text>: 25 (USD)
?

> -----------------------------------
> case 2: correct
> EditorPart.getOrientation = LTR
> BlockFlow orientation = RTL
> "(USD) 25 :<rtl text>"

Good, this is the only case we have tested.

> -----------------------------------
> case 3: incorrect
> EditorPart.getOrientation = RTL
> BlockFlow orientation = LTR
> "(USD) <rtl text> :25"

You are seeing mirrored, LTR text. Currently we are not expecting mirroring
to be enabled.

>
> -----------------------------------
> case 4: incorrect
> EditorPart.getOrientation = RTL
> BlockFlow orientation = RTL
> "<rtl text> :25) USD("
> -----------------------------------
You are seeing mirrored RTL text. The text is being drawn in fragments,
which are arranged RTL, but then SWT flip-flops the locations to their
mirrored positions, giving the the above result. We are working on
supporting this case.

> Case 1 seems to be using LTR text layout rules, treating the colon and
> number 25 as part of the rtl word.
> Case 2 is the only correct scenario.
> Case 3 uses some strange ordering.
> Case 4 text layout is bizarre.
4 should be simple to fix. I'm still worred about 1 though. If 1 is
working and 4 is fixed, then 3 will work too.
Re: RTL and bidi behavior [message #173404 is a reply to message #173373] Wed, 23 March 2005 23:15 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Maybe. It isn't clear yet whether changing a block to RTL in an LTR editor
will ALSO change the overall alignment of the block to right. It may be
necessary to also change the alignment.

"Thuc" <tqnguyen@ca.ibm.com> wrote in message
news:d1t4if$npj$1@news.eclipse.org...
> You're right that case 1 is showing the phrase correctly. Thinking back on
> what I wrote, what I really meant as "correct" behavior is that the RTL
> phrase appear properly in RTL mode. Of course with case 1, with everything
> set to LTR, the text is displayed using LTR layout.
>
> Once GEF RTL and bidi development is working 100%, is it correct to say
> the
> following?
> With the 4 cases below, we will see only two different results. Regardless
> of the EditorPart orientation, the text will be one of the following based
> only on the BlockFlow orientation:
>
> BLockFlow orientation = LTR
> "25 :<rtl text> (USD)"
>
> BLockFlow orientation = RTL
> "(USD) 25 :<rtl text>"
>
> thanks
>
Re: RTL and bidi behavior [message #174058 is a reply to message #173373] Mon, 28 March 2005 16:51 Go to previous messageGo to next message
Eclipse UserFriend
Thuc, I am not able to reproduce the same results as you in cases 3 and 4.
Can you provide a snippet showing what you did? What GEF build are you
using?

"Thuc" <tqnguyen@ca.ibm.com> wrote in message
news:d1t4if$npj$1@news.eclipse.org...
> You're right that case 1 is showing the phrase correctly. Thinking back on
> what I wrote, what I really meant as "correct" behavior is that the RTL
> phrase appear properly in RTL mode. Of course with case 1, with everything
> set to LTR, the text is displayed using LTR layout.
>
> Once GEF RTL and bidi development is working 100%, is it correct to say
the
> following?
> With the 4 cases below, we will see only two different results. Regardless
> of the EditorPart orientation, the text will be one of the following based
> only on the BlockFlow orientation:
>
> BLockFlow orientation = LTR
> "25 :<rtl text> (USD)"
>
> BLockFlow orientation = RTL
> "(USD) 25 :<rtl text>"
>
> thanks
>
> "Pratik Shah" <ppshah@us.ibm.com> wrote in message
> news:d1r09o$sm9$1@news.eclipse.org...
> Case 1 is correct behaviour. I've verified that TextLayout does the same.
> "Randy Hudson" <none@us.ibm.com> wrote in message
> news:d1pgb8$tv4$1@news.eclipse.org...
> > -----------------------------------
> > case 1: incorrect
> > EditorPart.getOrientation = LTR
> > BlockFlow orientation = LTR
> > "25 :<rtl text> (USD)"
>
> Why is this incorrect? should it be:
> <rtl text>: 25 (USD)
> ?
>
> > -----------------------------------
> > case 2: correct
> > EditorPart.getOrientation = LTR
> > BlockFlow orientation = RTL
> > "(USD) 25 :<rtl text>"
>
> Good, this is the only case we have tested.
>
> > -----------------------------------
> > case 3: incorrect
> > EditorPart.getOrientation = RTL
> > BlockFlow orientation = LTR
> > "(USD) <rtl text> :25"
>
> You are seeing mirrored, LTR text. Currently we are not expecting
mirroring
> to be enabled.
>
> >
> > -----------------------------------
> > case 4: incorrect
> > EditorPart.getOrientation = RTL
> > BlockFlow orientation = RTL
> > "<rtl text> :25) USD("
> > -----------------------------------
> You are seeing mirrored RTL text. The text is being drawn in fragments,
> which are arranged RTL, but then SWT flip-flops the locations to their
> mirrored positions, giving the the above result. We are working on
> supporting this case.
>
> > Case 1 seems to be using LTR text layout rules, treating the colon and
> > number 25 as part of the rtl word.
> > Case 2 is the only correct scenario.
> > Case 3 uses some strange ordering.
> > Case 4 text layout is bizarre.
> 4 should be simple to fix. I'm still worred about 1 though. If 1 is
> working and 4 is fixed, then 3 will work too.
>
>
Re: RTL and bidi behavior [message #174753 is a reply to message #174058] Thu, 31 March 2005 15:30 Go to previous messageGo to next message
Eclipse UserFriend
Pratik,
I'm using GEF 3.1 M5.

I'm using Sun JVM 1.4.1, and specifying the program argument "-dir rtl".

In LogicEditor, I override getOrientation() as follows:

public int getOrientation() {
return SWT.RIGHT_TO_LEFT;
}

And in StickyNoteFigure I add the following line in the
StickyNoteFigure(int) constructor:

flowPage.setOrientation(SWT.LEFT_TO_RIGHT);

Those changes will set up the environment for case 3. To set up case 4,
change the parameter in the flowPage.setOrientation call to
SWT.RIGHT_TO_LEFT.

Now start up the logic editor and place a label on the diagram. The only
tricky part is to find some RTL text. Once you get your hands on some
Arabic or Hebrew text, copy it and paste it into the label. Then add the
": 25 (USD)" text.

good luck


Pratik Shah wrote:
> Thuc, I am not able to reproduce the same results as you in cases 3 and 4.
> Can you provide a snippet showing what you did? What GEF build are you
> using?
>
> "Thuc" <tqnguyen@ca.ibm.com> wrote in message
> news:d1t4if$npj$1@news.eclipse.org...
>
>>You're right that case 1 is showing the phrase correctly. Thinking back on
>>what I wrote, what I really meant as "correct" behavior is that the RTL
>>phrase appear properly in RTL mode. Of course with case 1, with everything
>>set to LTR, the text is displayed using LTR layout.
>>
>>Once GEF RTL and bidi development is working 100%, is it correct to say
>
> the
>
>>following?
>>With the 4 cases below, we will see only two different results. Regardless
>>of the EditorPart orientation, the text will be one of the following based
>>only on the BlockFlow orientation:
>>
>>BLockFlow orientation = LTR
>>"25 :<rtl text> (USD)"
>>
>>BLockFlow orientation = RTL
>>"(USD) 25 :<rtl text>"
>>
>>thanks
>>
>>"Pratik Shah" <ppshah@us.ibm.com> wrote in message
>>news:d1r09o$sm9$1@news.eclipse.org...
>>Case 1 is correct behaviour. I've verified that TextLayout does the same.
>>"Randy Hudson" <none@us.ibm.com> wrote in message
>>news:d1pgb8$tv4$1@news.eclipse.org...
>>
>>>-----------------------------------
>>>case 1: incorrect
>>>EditorPart.getOrientation = LTR
>>>BlockFlow orientation = LTR
>>>"25 :<rtl text> (USD)"
>>
>>Why is this incorrect? should it be:
>><rtl text>: 25 (USD)
>>?
>>
>>
>>>-----------------------------------
>>>case 2: correct
>>>EditorPart.getOrientation = LTR
>>>BlockFlow orientation = RTL
>>>"(USD) 25 :<rtl text>"
>>
>>Good, this is the only case we have tested.
>>
>>
>>>-----------------------------------
>>>case 3: incorrect
>>>EditorPart.getOrientation = RTL
>>>BlockFlow orientation = LTR
>>>"(USD) <rtl text> :25"
>>
>>You are seeing mirrored, LTR text. Currently we are not expecting
>
> mirroring
>
>>to be enabled.
>>
>>
>>>-----------------------------------
>>>case 4: incorrect
>>>EditorPart.getOrientation = RTL
>>>BlockFlow orientation = RTL
>>>"<rtl text> :25) USD("
>>>-----------------------------------
>>
>>You are seeing mirrored RTL text. The text is being drawn in fragments,
>>which are arranged RTL, but then SWT flip-flops the locations to their
>>mirrored positions, giving the the above result. We are working on
>>supporting this case.
>>
>>
>>>Case 1 seems to be using LTR text layout rules, treating the colon and
>>>number 25 as part of the rtl word.
>>>Case 2 is the only correct scenario.
>>>Case 3 uses some strange ordering.
>>>Case 4 text layout is bizarre.
>>
>>4 should be simple to fix. I'm still worred about 1 though. If 1 is
>>working and 4 is fixed, then 3 will work too.
>>
>>
>
>
>
Re: RTL and bidi behavior [message #181215 is a reply to message #173373] Fri, 13 May 2005 00:23 Go to previous message
Eclipse UserFriend
"Thuc" <tqnguyen@ca.ibm.com> wrote in message
news:d1t4if$npj$1@news.eclipse.org...
> You're right that case 1 is showing the phrase correctly. Thinking back on
> what I wrote, what I really meant as "correct" behavior is that the RTL
> phrase appear properly in RTL mode. Of course with case 1, with everything
> set to LTR, the text is displayed using LTR layout.
>
> Once GEF RTL and bidi development is working 100%, is it correct to say
the
> following?
> With the 4 cases below, we will see only two different results. Regardless
> of the EditorPart orientation, the text will be one of the following based
> only on the BlockFlow orientation:

Yes, that is correct.

>
> BLockFlow orientation = LTR
> "25 :<rtl text> (USD)"
>
> BLockFlow orientation = RTL
> "(USD) 25 :<rtl text>"
>
> thanks
>
> "Pratik Shah" <ppshah@us.ibm.com> wrote in message
> news:d1r09o$sm9$1@news.eclipse.org...
> Case 1 is correct behaviour. I've verified that TextLayout does the same.
> "Randy Hudson" <none@us.ibm.com> wrote in message
> news:d1pgb8$tv4$1@news.eclipse.org...
> > -----------------------------------
> > case 1: incorrect
> > EditorPart.getOrientation = LTR
> > BlockFlow orientation = LTR
> > "25 :<rtl text> (USD)"
>
> Why is this incorrect? should it be:
> <rtl text>: 25 (USD)
> ?
>
> > -----------------------------------
> > case 2: correct
> > EditorPart.getOrientation = LTR
> > BlockFlow orientation = RTL
> > "(USD) 25 :<rtl text>"
>
> Good, this is the only case we have tested.
>
> > -----------------------------------
> > case 3: incorrect
> > EditorPart.getOrientation = RTL
> > BlockFlow orientation = LTR
> > "(USD) <rtl text> :25"
>
> You are seeing mirrored, LTR text. Currently we are not expecting
mirroring
> to be enabled.
>
> >
> > -----------------------------------
> > case 4: incorrect
> > EditorPart.getOrientation = RTL
> > BlockFlow orientation = RTL
> > "<rtl text> :25) USD("
> > -----------------------------------
> You are seeing mirrored RTL text. The text is being drawn in fragments,
> which are arranged RTL, but then SWT flip-flops the locations to their
> mirrored positions, giving the the above result. We are working on
> supporting this case.
>
> > Case 1 seems to be using LTR text layout rules, treating the colon and
> > number 25 as part of the rtl word.
> > Case 2 is the only correct scenario.
> > Case 3 uses some strange ordering.
> > Case 4 text layout is bizarre.
> 4 should be simple to fix. I'm still worred about 1 though. If 1 is
> working and 4 is fixed, then 3 will work too.
>
>
Previous Topic:NoClassDefFoundError
Next Topic:Performance Problems
Goto Forum:
  


Current Time: Mon Aug 18 05:23:43 EDT 2025

Powered by FUDForum. Page generated in 0.10040 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top