Re: BIDI reordering routine

2003-03-04 Thread Oleg Tkachenko
Rodolfo M. Raya wrote:
Does anybody have a routine to reorder BIDI text?
You can use java.text.Bidi from jdk1.4 and sun.awt.font.Bidi in jdk1.2/1.3, 
they provide basic BIDI facilities. The problem is that java.text.Bidi is 
since jdk1.4 and sun.awt.font.Bidi does not exist in jdk1.4. So I suggest you 
not to use BIDI implementation directly, but indirectly through 
java.awt.font.TextLayout and so on.

I'm writing code to visually reorder BIDI text before generating XSL-FO 
files, but I don't want to reinvent the wheel.
btw, that's not the solution actually. This way you do provide visually 
reordered text to FOP, but FOP as being BIDI-unaware will still layout text 
ltr-tb, so you'll end with rtl-bt layout:

logical: RAC A SI SIHT
visual: THIS IS A CAR
One line is ok, but once line break occurs:
IS A CAR
THIS
The solution is to make FOP BIDI-aware itself. I have experimented with it and 
actually I have BIDI-aware version of FOP 0.20.5rc or earlier, but the 
implementation is neither fast nor clean from design point of view, so I 
decided not to commit it to cvs, but instead to implement it in FOP1.0dev in a 
better way. You are welcome to help us with this. Lack of free time, 
unfortunately, you know, too many day works last time :

--
Oleg Tkachenko
Multiconn Technologies, Israel
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: BIDI reordering routine

2003-03-04 Thread Rodolfo M. Raya
On Tue, 2003-03-04 at 08:20, Oleg Tkachenko wrote:
 Rodolfo M. Raya wrote:
 
  Does anybody have a routine to reorder BIDI text?
 You can use java.text.Bidi from jdk1.4 and sun.awt.font.Bidi in jdk1.2/1.3, 
 they provide basic BIDI facilities. The problem is that java.text.Bidi is 
 since jdk1.4 and sun.awt.font.Bidi does not exist in jdk1.4. So I suggest you 
 not to use BIDI implementation directly, but indirectly through 
 java.awt.font.TextLayout and so on.

I can't use Sun's Bidi class directly because some users will be
running  jdk 1.3. I'll try with java.awt.font.TextLayout.

  I'm writing code to visually reorder BIDI text before generating XSL-FO 
  files, but I don't want to reinvent the wheel.
 btw, that's not the solution actually. This way you do provide visually 
 reordered text to FOP, but FOP as being BIDI-unaware will still layout text 
 ltr-tb, so you'll end with rtl-bt layout:
 
 logical: RAC A SI SIHT
 visual: THIS IS A CAR
 One line is ok, but once line break occurs:
 IS A CAR
  THIS
 
 The solution is to make FOP BIDI-aware itself. I have experimented with it 
 and 
 actually I have BIDI-aware version of FOP 0.20.5rc or earlier, but the 
 implementation is neither fast nor clean from design point of view, so I 
 decided not to commit it to cvs, but instead to implement it in FOP1.0dev in 
 a 
 better way. You are welcome to help us with this. Lack of free time, 
 unfortunately, you know, too many day works last time :

Can you send me the code? I can try to clean it. My deadline is March
7th, so I have 2 days to play with it.

Thanks and regards,
Rodolfo

-- 
Rodolfo M. Raya [EMAIL PROTECTED]
Heartsome Holdings Pte. Ltd.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]