You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Sebastian Weber <se...@hmedia.de> on 2006/08/04 16:31:24 UTC
writing-mode and arabic text
If I set the writing-mode to rl-tb my text is flipped vertical. This happens
because the CTM class rotates the transformation matrix for rendering
according to the writing mode. If I want to write right-to-left this has
nothing to do with mirroring of cause and I disabled it, because I want to
print arabic text. So what is the purpose of mirroring in rl-tb
writing-mode? What errors will appear if I disable the CTM.getWMctm()
function that does the mirroring according to the writing-mode?
I achived printing (pdf) arabic text after some weeks of work ignoring any
xsl:fo recommendations. The most things I did in the TextLayoutManager. Now
I'm thinking about implementing it according to the recommendations and the
BIDI algorithm. Is anyone already engaged in this?
Regards, Sebastian
Re: arabic text
Posted by Prakash sen <pr...@gmail.com>.
Hi Sebastian,
Sorry For replying so late. I had used the FOP and is working fine for me.
The arabic text are comming properly.
The text is comming properly only if we specify the writting mode in block
container other than that if I specify in cell or block it wont work.
The FOP which u had specified is a partial. Actually I m using a java file
to which i am sending xml & xsl fo as byte array & returning a pdf as byte
array It uses Driver class etc for rendering.
Can u please Help or suggest me to resolve this problem.
Thanks & Regards,
Prakash Sen
Sebastian Weber-2 wrote:
>
> 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
>
>
>
--
View this message in context: http://www.nabble.com/writing-mode-and-arabic-text-tf2051509.html#a6185263
Sent from the FOP - Dev forum at Nabble.com.
Re: arabic text
Posted by Prakash sen <pr...@gmail.com>.
Hi Sebastian,
By using your fop only I am able to print in arabic, Not with the
normal fop. Noraml fop does not support block container & writting mode.
In the Fop given by you It prints properly only when-
1) If I specify writting-mode="rl-tb" in the blockcontainer
other than that if I specify in other place like fo:block than the text are
not comming properly.
Using Command Prompt I am able to print It, But Now My Problem is In my
project I am using a java class file in which I send Xml,XSLT and get pdf as
Byte Array (Note: The File is the same which we get in apache to which we
send xml,xslt files). In this file Driver Class is also used for rendering
to pdf which is not present in your FOP.
Can u please Help or suggest me to solve this problem.
Thanks & Regards,
Prakash Sen
--
View this message in context: http://www.nabble.com/writing-mode-and-arabic-text-tf2051509.html#a6319432
Sent from the FOP - Dev forum at Nabble.com.
Re: arabic text
Posted by Kia Teymourian <ki...@cs.tu-berlin.de>.
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
>
>
>
arabic text
Posted by Sebastian Weber <se...@hmedia.de>.
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
Re: writing-mode and arabic text
Posted by Prakash sen <pr...@gmail.com>.
Hi Sebastian,
I had tried for printing in arabic using fop. But the Text were reversed in
the pdf after that i used a function to reverse in fo file but the meaning
of the text got changed. Could you Please help me in which file you disabled
that function to get arabic print properly or any idea how to do that.
Please Chk the attachment . I had displayed two line 1) Correct 2) Wrong
Regards Prakash.
http://www.nabble.com/user-files/235836/QuotHeader.doc QuotHeader.doc
Sebastian Weber-2 wrote:
>
> If I set the writing-mode to rl-tb my text is flipped vertical. This
> happens
> because the CTM class rotates the transformation matrix for rendering
> according to the writing mode. If I want to write right-to-left this has
> nothing to do with mirroring of cause and I disabled it, because I want to
> print arabic text. So what is the purpose of mirroring in rl-tb
> writing-mode? What errors will appear if I disable the CTM.getWMctm()
> function that does the mirroring according to the writing-mode?
> I achived printing (pdf) arabic text after some weeks of work ignoring any
> xsl:fo recommendations. The most things I did in the TextLayoutManager.
> Now
> I'm thinking about implementing it according to the recommendations and
> the
> BIDI algorithm. Is anyone already engaged in this?
>
> Regards, Sebastian
>
>
>
>
--
View this message in context: http://www.nabble.com/writing-mode-and-arabic-text-tf2051509.html#a6098133
Sent from the FOP - Dev forum at Nabble.com.
Re: writing-mode and arabic text
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
I don't think anyone is actively working on this.
I'd not take the current CTMs too seriously. I think they are only there
to indicate the possibility of supporting different writing mode at some
point. If you change the CTM stuff some of the test cases demonstrating
the writing mode capabilities will probably fail. But since they are
probably not really testing the right stuff, that shouldn't be a problem.
We've had a number of discussion already about implementing different
writing modes, BIDI, UAX#14 and whatever terms are involved. I don't
know how much research you've done on the mailing list archives already.
But I think it would be good if you took a look at those discussions. At
any rate, I think we'd be curious about the approach you've taken. Maybe
you could tell us a little more. Anyway, I'm quite happy to hear someone
wants to jump in here.
On 04.08.2006 16:31:24 Sebastian Weber wrote:
> If I set the writing-mode to rl-tb my text is flipped vertical. This happens
> because the CTM class rotates the transformation matrix for rendering
> according to the writing mode. If I want to write right-to-left this has
> nothing to do with mirroring of cause and I disabled it, because I want to
> print arabic text. So what is the purpose of mirroring in rl-tb
> writing-mode? What errors will appear if I disable the CTM.getWMctm()
> function that does the mirroring according to the writing-mode?
> I achived printing (pdf) arabic text after some weeks of work ignoring any
> xsl:fo recommendations. The most things I did in the TextLayoutManager. Now
> I'm thinking about implementing it according to the recommendations and the
> BIDI algorithm. Is anyone already engaged in this?
>
> Regards, Sebastian
Jeremias Maerki