|
Hi all, thanks for your answers! Jeremias Maerki schrieb: On 08.10.2006 23:01:13 Kia Teymourian wrote:Hi all, My first post to the mailing list was in May 2006, http://www.mail-archive.com/[email protected]/msg04325.html may be you mean this post. I could find several implementations, but now I am looking for the best one. The first and the most important step is to have a solution for finding the correct Arabic presentation forms or glyphs. As you know when we write an Arabic word, Arabic characters are connected together and will have a different presentation form or glyphs depending on their position in a word or as they have in isolated form. We could have 4 different presentation forms for a single Arabic character: Isolated, when the Character are alone Initial, when the Character are at the Start position of the Character array of the Arabic Word End, when the Character are at the End position of the Character array of the Arabic Word Middle, when the Character are in the middle of a Character array. Arabic Unicode Characters are between, arabicStart = 0x0600; and arabicEnd = 0x06FF; and we send a word to the algorithm if they contain an Arabic Character. For instance, we should find for the following word the correct Presentation form. <fo:block font-size="14pt" font-family="Tahoma" line-height="14pt" space-after.optimum="12pt" writing-mode="rl-tb" > تیموریان </fo:block> This is the form so as they are saved in FO file. We should find the correct Presentation and change this word to <fo:block font-size="14pt" font-family="Tahoma" line-height="14pt" space-after.optimum="12pt" writing-mode="rl-tb" > ﺗﯿﻤﻮﺭﯾﺎﻥ </fo:block> finding the correct presentation form and reverse the Character array. you can see the difference and test it with a font which contains glyphs for the whole Unicode range of Arabic presentation forms A and B. You can easily find the characters on these links : http://www.alanwood.net/unicode/arabic.html http://www.alanwood.net/unicode/arabic_presentation_forms_b.html I have the implementation for this step but am looking for the best performance and compiling with java 1.3 The second step is to implement the Bidi Algorithm and the writing-mode, rt-tb, lr-tb and bidi-override. Sebastian Weber had already some changes for the writing-mode="rl-tb" http://www.anneundsebp.de/fop/fop.html Please check the points 4 and 5 about the TextLayoutManger and getWMctm() As you see we should reverse the character Array, and put the Arabic words from the right to left, but the ARABIC-INDIC DIGITs should be written from the left side, it means, we should not reverse these character arrays 0660-066D ARABIC-INDIC DIGITs 06F0-06F9 EXTENDED ARABIC-INDIC DIGITs and then the correct implementation of : http://www.w3.org/TR/2001/REC-xsl-20011015/slice5.html#section-N6720-Unicode-BIDI-Processing I am working on this Patch and will send you my questions. And I will also send you some documentations about the Arabic texts and Bidirectional algorithm, or write them in Wiki. regards Kia Teymourian |
- PATCH for Arabic/Persian Text, and Bidi-override! Kia Teymourian
- Re: PATCH for Arabic/Persian Text, and Bidi-overr... Jeremias Maerki
- Re: PATCH for Arabic/Persian Text, and Bidi-o... Kia Teymourian
- Re: PATCH for Arabic/Persian Text, and Bi... Kia Teymourian
- Re: PATCH for Arabic/Persian Text, an... Manuel Mall
- Re: PATCH for Arabic/Persian Text, and Bidi-overr... Manuel Mall
- Re: PATCH for Arabic/Persian Text, and Bidi-o... Andreas L Delmelle
- Re: PATCH for Arabic/Persian Text, and Bi... J.Pietschmann
- Re: PATCH for Arabic/Persian Text, an... Andreas L Delmelle
- Re: PATCH for Arabic/Persian Text, and Bidi-overr... richardw
- Re: PATCH for Arabic/Persian Text, and Bidi-o... Simon Pepping
