Hi Sebastian,

It is good news that you are working on the implementation of Bidirectional Algorithm. As you can read in this thread [1], I’m working also on this task and looking for an independent solution without the usage of java.text.bidi, trying to keep it
compatible with JDK 1.3.

I could find some useful codes in iText project [2] and wrote a simple class for
Arabic-shaping on Arabic/Persian inline texts.
I wrote a simple fo test file[3] and gave it to my class and done the Arabic shaping and the converting them into Hexadecimals [4]. At the end I created a test pdf file [5].

Now I am trying to rewrite the codes from the iText completely for the best performance
and find the best place to integrate them into the fop project.
The abrabic shaping is not required for the rtf, text or xml output, it is just a problem with pdf, ps,
and pcl.

Please look at these classes in iText project:
com.lowagie.text.pdf.ArabicLigaturizer
com.lowagie.text.pdf.BidiOrder
com.lowagie.text.pdf.BidiLine

I don’t know if you used the java.text.bidi or maybe the java.awt for the Arabic shaping, but it
works well with some small bugs,
I created from the same fo file [3] with your arabicfop a pdf file [6] and have seen that there is some connection problems, see the (ALLEF connections, the vertical lines to the other words).
Please compare it with [5], and check the presentaion form A/B in Unicode.
This is not a font problem; I tested the same files with your font and several other Unicode ttf fonts.

There is some free fonts for Arabic and Persian language(GPL) [7], may be we can create some free
Arabic/Persian fonts for fop.

Unfortunately I could get your first email on 4th August, because of some problems with the mail server. About the CTM class and the rl-tb writing mode, in Arabic shaping we find the Arabic words in a paragraph, then find the presentation forms for the chars depending on the position of chars in a word (four possibilities) and at the end we should reverse the Arabic words but not the English/Latin words between the Arabic paragraph. I think we can work together and trying to find a JDK1.3 compatible solution. My aim is to be able to create Persian/Arabic documentation with docbook XML. I am looking forward to your email! (Wenn du willst, kannst du mir auf Deutsch schreiben!)

Kind regards,
Kia Teymourian

[1] http://www.mail-archive.com/fop-dev@xmlgraphics.apache.org/msg04325.html
[2] http://www.lowagie.com/iText/
[3] http://user.cs.tu-berlin.de/~kiat/fop/TestSource.fo
[4] http://user.cs.tu-berlin.de/~kiat/fop/TestOutPut.fo
[5] http://user.cs.tu-berlin.de/~kiat/fop/TestOutPut.pdf
[6] http://user.cs.tu-berlin.de/~kiat/fop/your.pdf
[7] http://www.farsiweb.ir/wiki/Persian_fonts

Sebastian Weber schrieb:
Hi Prakash,
you can download the version of FOP that I use to print Arabic script from
www.anneundsebp.de/fop/fop.html

I hope it works for you. Unfortunately I don't understand Arabic but I know
that there are still some problems with the type setting. Maybe you can
inform me about bugs you'll find.
I'll add some explanations and the source code in a few days.

Regards
Sebastian



Reply via email to