You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Matthias Reischenbacher <ma...@gmx.at> on 2011/05/13 13:58:01 UTC

Re: Complex Script, BIDI text supported?

Hi Glenn,

I've tested your git branch and the following additional issues came up:

1. fo:basic-links with internal destination don't work
2. fo:page-number references only sometimes work
3. start-indent on fo:block with a block-container child isn't taken 
into account.

Please let me know, if you want me to prepare a test case showing all 
three issues.

Best regards,
Matthias

On 31.03.2011 00:43, Glenn Adams wrote:
> Matthias,
>
> I just updated my working repo git://github.com/skynavga/fop.git with 
> fixes for fo:table and fo:list-block to account for RTL writing modes; 
> i.e., table column progression and list-item (label and body) 
> alignment are now RTL in RTL WM contexts.
>
> In the process, I uncovered two other issues as well, which I am now 
> working on along with the fo:character problem you reported:
>
>     * fo:block-container does not align right in a RTL WM context when
>       it does not use absolute or fixed positioning;
>     * fo:leader is not working in a RTL WM context;
>
> I will update you when I have fixes committed for these issues.
>
> G.
>
> On Wed, Mar 23, 2011 at 6:45 AM, Glenn Adams <glenn@skynav.com 
> <ma...@skynav.com>> wrote:
>
>     Thanks for uncovering these issues. Let me address them and I'll
>     let you know when they are fixed in my GIT repo. Perhaps after
>     that I can submit a new patch update for the SVN branch.
>
>     G.
>
>
>     2011/3/23 Matthias Reischenbacher <matthias8283@gmx.at
>     <ma...@gmx.at>>
>
>         Glenn,
>
>         I just tested a little bit more and the following
>         questions/problems came up:
>
>         1. Are table cells also supposed to flow from right to left in
>         "rl-tb" writing-mode?
>
>         2. Shouldn't list-item labels be displayed on the right side?
>
>         3. fo:character seem to overlap in rl mode.
>
>         I'm attaching a new test file and the current PDF output.
>
>         Thanks,
>         Matthias
>
>
>         On 22.03.2011 18:27, Matthias Reischenbacher wrote:
>
>
>             Hi Glenn,
>
>             thanks again for your help and doing all those fixes.
>             Today I've retested my
>             sample file with the git branch and everything works fine
>             now. I'll do some
>             more testing in the next weeks and I'll let you know if I
>             encounter any
>             problems.
>
>             Are you planning to submit a new patch for the apache svn
>             repo anytime soon?
>             If not, no problem. I'm just asking because I have some
>             local modifications
>             in my svn working copy which I'll have to apply manually
>             to the git working
>             copy.
>
>             Thanks&  best regards,
>             Matthias
>
>
>             Glenn Adams-2 wrote:
>
>
>                 Matthias,
>
>                 I've fixed the fo:block-container problem as well as
>                 text-align and
>                 treatment of writing-mode on page regions. The fixes
>                 are present in my GIT
>                 repo I referred to earlier  (and also include all
>                 trunk commits up to this
>                 point). To be a little more detailed:
>
>                    - the use of writing-mode="rl" on
>                 simple-page-master now results in
>                    correct interpretation of region-start and region
>                 end; i.e.,
>                 region-start is
>                    now on the right side of the page (with 0 reference
>                 orientation), and
>                    region-end is on the left side;
>                    - the erroneous (historical) mirroring around the y
>                 axis of viewports
>                    with writing-mode="rl", including those generated
>                 by region-* and
>                    block-container, has been removed;
>                    - both text-align and text-align-last now treat
>                 start and end as
>                 relative
>                    to the writing mode, e.g., text-align="start" is on
>                 the right when
>                    writing-mode="rl", etc.
>                    - if no text-align is specified, then in a
>                 writing-mode="rl" context
>                    correctly results in right (i.e., start) alignment,
>                 while in "lr" start
>                 is
>                    on left (assuming reference orientation of 0);
>
>                 I am aware of an existing problem with
>                 text-align="justify" in RTL WM
>                 contexts, and expect a fix in a day or so.
>
>                 Let me know if you encounter any other bidi problems.
>                 Also, just as a
>                 reminder, a neutral character, e.g., FULL STOP '.', at
>                 the end of a
>                 paragraph in a block takes on the default direction of
>                 the block. So, if
>                 you
>                 have a block of English text with a period at the end
>                 and it appears in a
>                 RTL WM context, then the period will be placed at the
>                 left of the last
>                 line,
>                 not the right as one might expect. This is actually
>                 correct behavior, and
>                 is
>                 a side effect of the Unicode bidi algorithm. To deal
>                 with this, you can
>                 wrap
>                 the English text including the period
>                 with<fo:bidi-override
>                 unicode-bidi="embed" direction="ltr">Sentence(s) with
>                 a period at the
>                 end.</fo:bidi-override>. This will create a LTR
>                 embedding context in the
>                 outer RTL context of the block.
>
>                 In general, you can use the fo:bidi-override element
>                 to both create bidi
>                 embedding levels and also to override the
>                 directionality of text as would
>                 be
>                 computed by the Unicode bidi algorithm.
>
>                 G.
>
>                 On Wed, Mar 9, 2011 at 2:28 PM, Glenn
>                 Adams<glenn@skynav.com <ma...@skynav.com>>  wrote:
>
>                     I have a fix for the block-container issue as
>                     well, which I will commit
>                     shortly to my GIT repo. The problem was that
>                     earlier (pre complex script)
>                     code apparently assumed that right-to-left writing
>                     mode was handled by
>                     mirroring the CTM around the y axis, so it was
>                     setting the CTM
>                     incorrectly
>                     for the viewport area generated by
>                     block-container. In fact there is no
>                     relationship between WM and reference orientation
>                     (and thus CTM on
>                     viewport
>                     area).
>
>                     I'll let you know when I've made the commit.
>
>                     G.
>
>
>                     On Wed, Mar 9, 2011 at 2:10 PM, Matthias
>                     Reischenbacher<
>                     matthias8283@gmx.at <ma...@gmx.at>>
>                      wrote:
>
>
>                         Ok, thanks a lot for your help!
>                         Matthias
>
>
>                         Glenn Adams-2 wrote:
>
>
>                             It appears the problem is due to a bug
>                             related to the use of
>                             block-container, which I will look into.
>                             However, if you remove
>                             block-container, and put the writing-mode
>                             and (default) font-family on
>                             fo:page-sequence, it should produce
>                             correct results. See attached for
>
>                         what
>
>                             I'm getting (using the current GITHUB
>                             repo) with a modified FO.
>
>                             I would advise you use the GIT repository
>                             for now, because it is kept
>
>                         up
>
>                             to
>                             date with my working copy. I submit a
>                             patch irregularly for
>
>                         integration
>
>                             into
>                             the SVN Temp_ComplexScripts branch.
>
>                             G.
>
>                             On Wed, Mar 9, 2011 at 12:21 PM, Matthias
>                             Reischenbacher<
>                             matthias8283@gmx.at
>                             <ma...@gmx.at>>  wrote:
>
>
>                                 Glenn,
>
>                                 here it goes:
>                                 Fo file:
>                                 http://old.nabble.com/file/p31109566/hebrew_test.xml
>                                 hebrew_test.xml
>                                 PDF file:
>                                 http://old.nabble.com/file/p31109566/hebrew_test.pdf
>                                 hebrew_test.pdf
>
>                                 Should I try building your code on git
>                                 hub? I've never used git
>
>                         therefore
>
>                                 I
>                                 first went with the apache SVN branch.
>
>                                 Thanks&  Regards,
>                                 Matthias
>
>
>                                 Glenn Adams-2 wrote:
>
>
>                                     Matthias,
>
>                                     Thanks for the report. Could you
>                                     send me the FO input file and PDF
>
>                                 output
>
>                                     file? I am actively testing and
>                                     fixing the Bidi and Script support,
>
>                                 with
>
>                                     real-time updates occurring at
>                                     git://github.com/skynavga/fop.git
>                                     <http://github.com/skynavga/fop.git>.
>
>                                     Regards,
>                                     Glenn
>
>                                     On Wed, Mar 9, 2011 at 11:28 AM,
>                                     Matthias Reischenbacher<
>                                     matthias8283@gmx.at
>                                     <ma...@gmx.at>>  wrote:
>
>
>                                         Glenn,
>
>                                         I tried your work today of the
>                                         complex script branch. I
>                                         managed to
>                                         generate
>                                         a PDF file with Hebrew text
>                                         using Arial Unicode MS font and
>
>                                 writing-mode
>
>                                         set
>                                         to rl-tb. The Hebrew text is
>                                         displayed fine but english
>                                         characters
>
>                         are
>
>                                         also
>                                         mirrored. Do I have to set an
>                                         additional xsl-fo attribute in
>                                         order
>
>                         to
>
>                                         correctly display english
>                                         characters or is the BIDI text
>                                         algorithm
>
>                         not
>
>                                         yet
>                                         implemented?
>
>                                         Thanks for your help,
>                                         Matthias Reischenbacher
>                                         --
>                                         View this message in context:
>
>
>                         http://old.nabble.com/Complex-Script%2C-BIDI-text-supported--tp31109094p31109094.html
>
>                                         Sent from the FOP - Users
>                                         mailing list archive at
>                                         Nabble.com.
>
>
>
>                         ---------------------------------------------------------------------
>
>                                         To unsubscribe, e-mail:
>
>                         fop-users-unsubscribe@xmlgraphics.apache.org
>                         <ma...@xmlgraphics.apache.org>
>
>                                         For additional commands, e-mail:
>
>                         fop-users-help@xmlgraphics.apache.org
>                         <ma...@xmlgraphics.apache.org>
>
>
>
>
>
>
>                                 --
>                                 View this message in context:
>
>                         http://old.nabble.com/Complex-Script%2C-BIDI-text-supported--tp31109094p31109566.html
>
>                                 Sent from the FOP - Users mailing list
>                                 archive at Nabble.com.
>
>
>                                 ---------------------------------------------------------------------
>                                 To unsubscribe, e-mail:
>                                 fop-users-unsubscribe@xmlgraphics.apache.org
>                                 <ma...@xmlgraphics.apache.org>
>                                 For additional commands, e-mail:
>
>                         fop-users-help@xmlgraphics.apache.org
>                         <ma...@xmlgraphics.apache.org>
>
>
>
>
>                             <?xml version="1.0" encoding="UTF-8"?>
>                             <fo:root
>                             xmlns:fo="http://www.w3.org/1999/XSL/Format">
>                             <fo:layout-master-set>
>                             <fo:simple-page-master
>                             master-name="simple" page-height="5in"
>                             page-width="5in">
>                             <fo:region-body/>
>                             </fo:simple-page-master>
>                             </fo:layout-master-set>
>                             <fo:page-sequence
>                             master-reference="simple" writing-mode="rl-tb"
>                             font-family="Arial Unicode MS">
>                             <fo:flow flow-name="xsl-region-body">
>                             <fo:block>חוברת הוראות בטיחות זו מתמקדת
>                             בכמה מהמצבים העקרוניים
>                             שעשויים להתרחש בעת הפעלת המכונה
>                             ותחזוקתה.</fo:block>
>                             <fo:block>Test</fo:block>
>                             </fo:flow>
>                             </fo:page-sequence>
>                             </fo:root>
>
>
>
>                             ---------------------------------------------------------------------
>                             To unsubscribe, e-mail:
>                             fop-users-unsubscribe@xmlgraphics.apache.org
>                             <ma...@xmlgraphics.apache.org>
>                             For additional commands, e-mail:
>                             fop-users-help@xmlgraphics.apache.org
>                             <ma...@xmlgraphics.apache.org>
>
>
>                         --
>                         View this message in context:
>                         http://old.nabble.com/Complex-Script%2C-BIDI-text-supported--tp31109094p31110436.html
>                         Sent from the FOP - Users mailing list archive
>                         at Nabble.com.
>
>
>                         ---------------------------------------------------------------------
>                         To unsubscribe, e-mail:
>                         fop-users-unsubscribe@xmlgraphics.apache.org
>                         <ma...@xmlgraphics.apache.org>
>                         For additional commands, e-mail:
>                         fop-users-help@xmlgraphics.apache.org
>                         <ma...@xmlgraphics.apache.org>
>
>
>
>
>
>
>
>
>         ---------------------------------------------------------------------
>         To unsubscribe, e-mail:
>         fop-users-unsubscribe@xmlgraphics.apache.org
>         <ma...@xmlgraphics.apache.org>
>         For additional commands, e-mail:
>         fop-users-help@xmlgraphics.apache.org
>         <ma...@xmlgraphics.apache.org>
>
>
>

Re: Complex Script, BIDI text supported?

Posted by Glenn Adams <gl...@skynav.com>.
Matthias et al.,

The following issues have been fixed, and are available in the i18n.arabic
branch at http://github.com/skynavga/fop:

   - fo:character in RTL context (
   http://skynav.trac.cvsdude.com/fop/ticket/39)
   - fo:page-number-citation in RTL context (
   http://skynav.trac.cvsdude.com/fop/ticket/40)

Note that there remains an issue with fo:character in the context of certain
scripts, e.g., Arabic, Indic, etc., in which case an fo:character boundary
prevents script shaping (contextual variants, ligatures, etc) from occurring
across the element boundary. I am investigating ways to resolve this, but it
looks like it may require significant work to resolve. I am tracking this
separate problem at http://skynav.trac.cvsdude.com/fop/ticket/35.

Regards,
Glenn

2011/5/16 Matthias Reischenbacher <ma...@gmx.at>

>  Hi Glenn,
>
> attached you'll find a test case for the three reported problems. I hate to
> ask, but could you please fix issue # 1 (fo:page-number-citation) soon? That
> would be of great help.
>
> Thanks!
> Matthias
>
>
> On 13.05.2011 11:36, Glenn Adams wrote:
>
> Matthias,
>
>  Thanks. Yes, it would be helpful if you could send me minimal test cases
> for these issues, so I can address them.
>
>  Regards,
> Glenn
>
>  On Fri, May 13, 2011 at 5:58 AM, Matthias Reischenbacher <
> matthias8283@gmx.at> wrote:
>
>>  Hi Glenn,
>>
>> I've tested your git branch and the following additional issues came up:
>>
>> 1. fo:basic-links with internal destination don't work
>> 2. fo:page-number references only sometimes work
>> 3. start-indent on fo:block with a block-container child isn't taken into
>> account.
>>
>> Please let me know, if you want me to prepare a test case showing all
>> three issues.
>>
>>
>> Best regards,
>> Matthias
>>
>

Re: Complex Script, BIDI text supported?

Posted by Glenn Adams <gl...@skynav.com>.
Thanks. I'll see what I can do.

G.

2011/5/16 Matthias Reischenbacher <ma...@gmx.at>

>  Hi Glenn,
>
> attached you'll find a test case for the three reported problems. I hate to
> ask, but could you please fix issue # 1 (fo:page-number-citation) soon? That
> would be of great help.
>
> Thanks!
> Matthias
>
>
> On 13.05.2011 11:36, Glenn Adams wrote:
>
> Matthias,
>
>  Thanks. Yes, it would be helpful if you could send me minimal test cases
> for these issues, so I can address them.
>
>  Regards,
> Glenn
>
>  On Fri, May 13, 2011 at 5:58 AM, Matthias Reischenbacher <
> matthias8283@gmx.at> wrote:
>
>>  Hi Glenn,
>>
>> I've tested your git branch and the following additional issues came up:
>>
>> 1. fo:basic-links with internal destination don't work
>> 2. fo:page-number references only sometimes work
>> 3. start-indent on fo:block with a block-container child isn't taken into
>> account.
>>
>> Please let me know, if you want me to prepare a test case showing all
>> three issues.
>>
>>
>> Best regards,
>> Matthias
>>
>> On 31.03.2011 00:43, Glenn Adams wrote:
>>
>> Matthias,
>>
>>  I just updated my working repo git://github.com/skynavga/fop.git with
>> fixes for fo:table and fo:list-block to account for RTL writing modes; i.e.,
>> table column progression and list-item (label and body) alignment are now
>> RTL in RTL WM contexts.
>>
>>  In the process, I uncovered two other issues as well, which I am now
>> working on along with the fo:character problem you reported:
>>
>>    - fo:block-container does not align right in a RTL WM context when it
>>    does not use absolute or fixed positioning;
>>    - fo:leader is not working in a RTL WM context;
>>
>> I will update you when I have fixes committed for these issues.
>>
>>  G.
>>
>> On Wed, Mar 23, 2011 at 6:45 AM, Glenn Adams <gl...@skynav.com> wrote:
>>
>>> Thanks for uncovering these issues. Let me address them and I'll let you
>>> know when they are fixed in my GIT repo. Perhaps after that I can submit a
>>> new patch update for the SVN branch.
>>>
>>>  G.
>>>
>>>
>>>  2011/3/23 Matthias Reischenbacher <ma...@gmx.at>
>>>
>>>> Glenn,
>>>>
>>>> I just tested a little bit more and the following questions/problems
>>>> came up:
>>>>
>>>> 1. Are table cells also supposed to flow from right to left in "rl-tb"
>>>> writing-mode?
>>>>
>>>> 2. Shouldn't list-item labels be displayed on the right side?
>>>>
>>>> 3. fo:character seem to overlap in rl mode.
>>>>
>>>> I'm attaching a new test file and the current PDF output.
>>>>
>>>> Thanks,
>>>>  Matthias
>>>>
>>>>
>>>> On 22.03.2011 18:27, Matthias Reischenbacher wrote:
>>>>
>>>>>
>>>>> Hi Glenn,
>>>>>
>>>>> thanks again for your help and doing all those fixes. Today I've
>>>>> retested my
>>>>> sample file with the git branch and everything works fine now. I'll do
>>>>> some
>>>>> more testing in the next weeks and I'll let you know if I encounter any
>>>>> problems.
>>>>>
>>>>> Are you planning to submit a new patch for the apache svn repo anytime
>>>>> soon?
>>>>> If not, no problem. I'm just asking because I have some local
>>>>> modifications
>>>>> in my svn working copy which I'll have to apply manually to the git
>>>>> working
>>>>> copy.
>>>>>
>>>>> Thanks&  best regards,
>>>>> Matthias
>>>>>
>>>>>
>>>>> Glenn Adams-2 wrote:
>>>>>
>>>>>>
>>>>>> Matthias,
>>>>>>
>>>>>> I've fixed the fo:block-container problem as well as text-align and
>>>>>> treatment of writing-mode on page regions. The fixes are present in my
>>>>>> GIT
>>>>>> repo I referred to earlier  (and also include all trunk commits up to
>>>>>> this
>>>>>> point). To be a little more detailed:
>>>>>>
>>>>>>    - the use of writing-mode="rl" on simple-page-master now results in
>>>>>>    correct interpretation of region-start and region end; i.e.,
>>>>>> region-start is
>>>>>>    now on the right side of the page (with 0 reference orientation),
>>>>>> and
>>>>>>    region-end is on the left side;
>>>>>>    - the erroneous (historical) mirroring around the y axis of
>>>>>> viewports
>>>>>>    with writing-mode="rl", including those generated by region-* and
>>>>>>    block-container, has been removed;
>>>>>>    - both text-align and text-align-last now treat start and end as
>>>>>> relative
>>>>>>    to the writing mode, e.g., text-align="start" is on the right when
>>>>>>    writing-mode="rl", etc.
>>>>>>    - if no text-align is specified, then in a writing-mode="rl"
>>>>>> context
>>>>>>    correctly results in right (i.e., start) alignment, while in "lr"
>>>>>> start
>>>>>> is
>>>>>>    on left (assuming reference orientation of 0);
>>>>>>
>>>>>> I am aware of an existing problem with text-align="justify" in RTL WM
>>>>>> contexts, and expect a fix in a day or so.
>>>>>>
>>>>>> Let me know if you encounter any other bidi problems. Also, just as a
>>>>>> reminder, a neutral character, e.g., FULL STOP '.', at the end of a
>>>>>> paragraph in a block takes on the default direction of the block. So,
>>>>>> if
>>>>>> you
>>>>>> have a block of English text with a period at the end and it appears
>>>>>> in a
>>>>>> RTL WM context, then the period will be placed at the left of the last
>>>>>> line,
>>>>>> not the right as one might expect. This is actually correct behavior,
>>>>>> and
>>>>>> is
>>>>>> a side effect of the Unicode bidi algorithm. To deal with this, you
>>>>>> can
>>>>>> wrap
>>>>>> the English text including the period with<fo:bidi-override
>>>>>> unicode-bidi="embed" direction="ltr">Sentence(s) with a period at the
>>>>>> end.</fo:bidi-override>. This will create a LTR embedding context in
>>>>>> the
>>>>>> outer RTL context of the block.
>>>>>>
>>>>>> In general, you can use the fo:bidi-override element to both create
>>>>>> bidi
>>>>>> embedding levels and also to override the directionality of text as
>>>>>> would
>>>>>> be
>>>>>> computed by the Unicode bidi algorithm.
>>>>>>
>>>>>> G.
>>>>>>
>>>>>> On Wed, Mar 9, 2011 at 2:28 PM, Glenn Adams<gl...@skynav.com>  wrote:
>>>>>>
>>>>>>  I have a fix for the block-container issue as well, which I will
>>>>>>> commit
>>>>>>> shortly to my GIT repo. The problem was that earlier (pre complex
>>>>>>> script)
>>>>>>> code apparently assumed that right-to-left writing mode was handled
>>>>>>> by
>>>>>>> mirroring the CTM around the y axis, so it was setting the CTM
>>>>>>> incorrectly
>>>>>>> for the viewport area generated by block-container. In fact there is
>>>>>>> no
>>>>>>> relationship between WM and reference orientation (and thus CTM on
>>>>>>> viewport
>>>>>>> area).
>>>>>>>
>>>>>>> I'll let you know when I've made the commit.
>>>>>>>
>>>>>>> G.
>>>>>>>
>>>>>>>
>>>>>>> On Wed, Mar 9, 2011 at 2:10 PM, Matthias Reischenbacher<
>>>>>>> matthias8283@gmx.at>  wrote:
>>>>>>>
>>>>>>>
>>>>>>>> Ok, thanks a lot for your help!
>>>>>>>> Matthias
>>>>>>>>
>>>>>>>>
>>>>>>>> Glenn Adams-2 wrote:
>>>>>>>>
>>>>>>>>>
>>>>>>>>> It appears the problem is due to a bug related to the use of
>>>>>>>>> block-container, which I will look into. However, if you remove
>>>>>>>>> block-container, and put the writing-mode and (default) font-family
>>>>>>>>> on
>>>>>>>>> fo:page-sequence, it should produce correct results. See attached
>>>>>>>>> for
>>>>>>>>>
>>>>>>>> what
>>>>>>>>
>>>>>>>>> I'm getting (using the current GITHUB repo) with a modified FO.
>>>>>>>>>
>>>>>>>>> I would advise you use the GIT repository for now, because it is
>>>>>>>>> kept
>>>>>>>>>
>>>>>>>> up
>>>>>>>>
>>>>>>>>> to
>>>>>>>>> date with my working copy. I submit a patch irregularly for
>>>>>>>>>
>>>>>>>> integration
>>>>>>>>
>>>>>>>>> into
>>>>>>>>> the SVN Temp_ComplexScripts branch.
>>>>>>>>>
>>>>>>>>> G.
>>>>>>>>>
>>>>>>>>> On Wed, Mar 9, 2011 at 12:21 PM, Matthias Reischenbacher<
>>>>>>>>> matthias8283@gmx.at>  wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> Glenn,
>>>>>>>>>>
>>>>>>>>>> here it goes:
>>>>>>>>>> Fo file:  http://old.nabble.com/file/p31109566/hebrew_test.xml
>>>>>>>>>> hebrew_test.xml
>>>>>>>>>> PDF file:  http://old.nabble.com/file/p31109566/hebrew_test.pdf
>>>>>>>>>> hebrew_test.pdf
>>>>>>>>>>
>>>>>>>>>> Should I try building your code on git hub? I've never used git
>>>>>>>>>>
>>>>>>>>>  therefore
>>>>>>>>
>>>>>>>>>  I
>>>>>>>>>> first went with the apache SVN branch.
>>>>>>>>>>
>>>>>>>>>> Thanks&  Regards,
>>>>>>>>>> Matthias
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Glenn Adams-2 wrote:
>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Matthias,
>>>>>>>>>>>
>>>>>>>>>>> Thanks for the report. Could you send me the FO input file and
>>>>>>>>>>> PDF
>>>>>>>>>>>
>>>>>>>>>> output
>>>>>>>>>>
>>>>>>>>>>> file? I am actively testing and fixing the Bidi and Script
>>>>>>>>>>> support,
>>>>>>>>>>>
>>>>>>>>>> with
>>>>>>>>>>
>>>>>>>>>>> real-time updates occurring at git://github.com/skynavga/fop.git
>>>>>>>>>>> .
>>>>>>>>>>>
>>>>>>>>>>> Regards,
>>>>>>>>>>> Glenn
>>>>>>>>>>>
>>>>>>>>>>> On Wed, Mar 9, 2011 at 11:28 AM, Matthias Reischenbacher<
>>>>>>>>>>> matthias8283@gmx.at>  wrote:
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>> Glenn,
>>>>>>>>>>>>
>>>>>>>>>>>> I tried your work today of the complex script branch. I managed
>>>>>>>>>>>> to
>>>>>>>>>>>> generate
>>>>>>>>>>>> a PDF file with Hebrew text using Arial Unicode MS font and
>>>>>>>>>>>>
>>>>>>>>>>>  writing-mode
>>>>>>>>>>
>>>>>>>>>>>  set
>>>>>>>>>>>> to rl-tb. The Hebrew text is displayed fine but english
>>>>>>>>>>>> characters
>>>>>>>>>>>>
>>>>>>>>>>>   are
>>>>>>>>
>>>>>>>>>   also
>>>>>>>>>>>> mirrored. Do I have to set an additional xsl-fo attribute in
>>>>>>>>>>>> order
>>>>>>>>>>>>
>>>>>>>>>>>   to
>>>>>>>>
>>>>>>>>>   correctly display english characters or is the BIDI text
>>>>>>>>>>>> algorithm
>>>>>>>>>>>>
>>>>>>>>>>>   not
>>>>>>>>
>>>>>>>>>   yet
>>>>>>>>>>>> implemented?
>>>>>>>>>>>>
>>>>>>>>>>>> Thanks for your help,
>>>>>>>>>>>> Matthias Reischenbacher
>>>>>>>>>>>> --
>>>>>>>>>>>> View this message in context:
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>> http://old.nabble.com/Complex-Script%2C-BIDI-text-supported--tp31109094p31109094.html
>>>>>>>>
>>>>>>>>>   Sent from the FOP - Users mailing list archive at Nabble.com.
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>
>>>>>>>>>   To unsubscribe, e-mail:
>>>>>>>>>>>>
>>>>>>>>>>>   fop-users-unsubscribe@xmlgraphics.apache.org
>>>>>>>>
>>>>>>>>>   For additional commands, e-mail:
>>>>>>>>>>>>
>>>>>>>>>>>   fop-users-help@xmlgraphics.apache.org
>>>>>>>>
>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> View this message in context:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>> http://old.nabble.com/Complex-Script%2C-BIDI-text-supported--tp31109094p31109566.html
>>>>>>>>
>>>>>>>>>  Sent from the FOP - Users mailing list archive at Nabble.com.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>>> To unsubscribe, e-mail:
>>>>>>>>>> fop-users-unsubscribe@xmlgraphics.apache.org
>>>>>>>>>> For additional commands, e-mail:
>>>>>>>>>>
>>>>>>>>>  fop-users-help@xmlgraphics.apache.org
>>>>>>>>
>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
>>>>>>>>>   <fo:layout-master-set>
>>>>>>>>>     <fo:simple-page-master master-name="simple" page-height="5in"
>>>>>>>>> page-width="5in">
>>>>>>>>>       <fo:region-body/>
>>>>>>>>>     </fo:simple-page-master>
>>>>>>>>>   </fo:layout-master-set>
>>>>>>>>>   <fo:page-sequence master-reference="simple" writing-mode="rl-tb"
>>>>>>>>> font-family="Arial Unicode MS">
>>>>>>>>>     <fo:flow flow-name="xsl-region-body">
>>>>>>>>>       <fo:block>חוברת הוראות בטיחות זו מתמקדת בכמה מהמצבים
>>>>>>>>> העקרוניים
>>>>>>>>> שעשויים להתרחש בעת הפעלת המכונה ותחזוקתה.</fo:block>
>>>>>>>>>       <fo:block>Test</fo:block>
>>>>>>>>>     </fo:flow>
>>>>>>>>>   </fo:page-sequence>
>>>>>>>>> </fo:root>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>> To unsubscribe, e-mail:
>>>>>>>>> fop-users-unsubscribe@xmlgraphics.apache.org
>>>>>>>>> For additional commands, e-mail:
>>>>>>>>> fop-users-help@xmlgraphics.apache.org
>>>>>>>>>
>>>>>>>>>
>>>>>>>> --
>>>>>>>> View this message in context:
>>>>>>>>
>>>>>>>> http://old.nabble.com/Complex-Script%2C-BIDI-text-supported--tp31109094p31110436.html
>>>>>>>> Sent from the FOP - Users mailing list archive at Nabble.com.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> ---------------------------------------------------------------------
>>>>>>>> To unsubscribe, e-mail:
>>>>>>>> fop-users-unsubscribe@xmlgraphics.apache.org
>>>>>>>> For additional commands, e-mail:
>>>>>>>> fop-users-help@xmlgraphics.apache.org
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>>>> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>>>>
>>>
>>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>

Re: Complex Script, BIDI text supported?

Posted by Matthias Reischenbacher <ma...@gmx.at>.
Hi Glenn,

attached you'll find a test case for the three reported problems. I hate 
to ask, but could you please fix issue # 1 (fo:page-number-citation) 
soon? That would be of great help.

Thanks!
Matthias

On 13.05.2011 11:36, Glenn Adams wrote:
> Matthias,
>
> Thanks. Yes, it would be helpful if you could send me minimal test 
> cases for these issues, so I can address them.
>
> Regards,
> Glenn
>
> On Fri, May 13, 2011 at 5:58 AM, Matthias Reischenbacher 
> <matthias8283@gmx.at <ma...@gmx.at>> wrote:
>
>     Hi Glenn,
>
>     I've tested your git branch and the following additional issues
>     came up:
>
>     1. fo:basic-links with internal destination don't work
>     2. fo:page-number references only sometimes work
>     3. start-indent on fo:block with a block-container child isn't
>     taken into account.
>
>     Please let me know, if you want me to prepare a test case showing
>     all three issues.
>
>
>     Best regards,
>     Matthias
>
>     On 31.03.2011 00:43, Glenn Adams wrote:
>>     Matthias,
>>
>>     I just updated my working repo git://github.com/skynavga/fop.git
>>     with fixes for fo:table and fo:list-block to account for RTL
>>     writing modes; i.e., table column progression and list-item
>>     (label and body) alignment are now RTL in RTL WM contexts.
>>
>>     In the process, I uncovered two other issues as well, which I am
>>     now working on along with the fo:character problem you reported:
>>
>>         * fo:block-container does not align right in a RTL WM context
>>           when it does not use absolute or fixed positioning;
>>         * fo:leader is not working in a RTL WM context;
>>
>>     I will update you when I have fixes committed for these issues.
>>
>>     G.
>>
>>     On Wed, Mar 23, 2011 at 6:45 AM, Glenn Adams <glenn@skynav.com
>>     <ma...@skynav.com>> wrote:
>>
>>         Thanks for uncovering these issues. Let me address them and
>>         I'll let you know when they are fixed in my GIT repo. Perhaps
>>         after that I can submit a new patch update for the SVN branch.
>>
>>         G.
>>
>>
>>         2011/3/23 Matthias Reischenbacher <matthias8283@gmx.at
>>         <ma...@gmx.at>>
>>
>>             Glenn,
>>
>>             I just tested a little bit more and the following
>>             questions/problems came up:
>>
>>             1. Are table cells also supposed to flow from right to
>>             left in "rl-tb" writing-mode?
>>
>>             2. Shouldn't list-item labels be displayed on the right side?
>>
>>             3. fo:character seem to overlap in rl mode.
>>
>>             I'm attaching a new test file and the current PDF output.
>>
>>             Thanks,
>>             Matthias
>>
>>
>>             On 22.03.2011 18:27, Matthias Reischenbacher wrote:
>>
>>
>>                 Hi Glenn,
>>
>>                 thanks again for your help and doing all those fixes.
>>                 Today I've retested my
>>                 sample file with the git branch and everything works
>>                 fine now. I'll do some
>>                 more testing in the next weeks and I'll let you know
>>                 if I encounter any
>>                 problems.
>>
>>                 Are you planning to submit a new patch for the apache
>>                 svn repo anytime soon?
>>                 If not, no problem. I'm just asking because I have
>>                 some local modifications
>>                 in my svn working copy which I'll have to apply
>>                 manually to the git working
>>                 copy.
>>
>>                 Thanks&  best regards,
>>                 Matthias
>>
>>
>>                 Glenn Adams-2 wrote:
>>
>>
>>                     Matthias,
>>
>>                     I've fixed the fo:block-container problem as well
>>                     as text-align and
>>                     treatment of writing-mode on page regions. The
>>                     fixes are present in my GIT
>>                     repo I referred to earlier  (and also include all
>>                     trunk commits up to this
>>                     point). To be a little more detailed:
>>
>>                        - the use of writing-mode="rl" on
>>                     simple-page-master now results in
>>                        correct interpretation of region-start and
>>                     region end; i.e.,
>>                     region-start is
>>                        now on the right side of the page (with 0
>>                     reference orientation), and
>>                        region-end is on the left side;
>>                        - the erroneous (historical) mirroring around
>>                     the y axis of viewports
>>                        with writing-mode="rl", including those
>>                     generated by region-* and
>>                        block-container, has been removed;
>>                        - both text-align and text-align-last now
>>                     treat start and end as
>>                     relative
>>                        to the writing mode, e.g., text-align="start"
>>                     is on the right when
>>                        writing-mode="rl", etc.
>>                        - if no text-align is specified, then in a
>>                     writing-mode="rl" context
>>                        correctly results in right (i.e., start)
>>                     alignment, while in "lr" start
>>                     is
>>                        on left (assuming reference orientation of 0);
>>
>>                     I am aware of an existing problem with
>>                     text-align="justify" in RTL WM
>>                     contexts, and expect a fix in a day or so.
>>
>>                     Let me know if you encounter any other bidi
>>                     problems. Also, just as a
>>                     reminder, a neutral character, e.g., FULL STOP
>>                     '.', at the end of a
>>                     paragraph in a block takes on the default
>>                     direction of the block. So, if
>>                     you
>>                     have a block of English text with a period at the
>>                     end and it appears in a
>>                     RTL WM context, then the period will be placed at
>>                     the left of the last
>>                     line,
>>                     not the right as one might expect. This is
>>                     actually correct behavior, and
>>                     is
>>                     a side effect of the Unicode bidi algorithm. To
>>                     deal with this, you can
>>                     wrap
>>                     the English text including the period
>>                     with<fo:bidi-override
>>                     unicode-bidi="embed" direction="ltr">Sentence(s)
>>                     with a period at the
>>                     end.</fo:bidi-override>. This will create a LTR
>>                     embedding context in the
>>                     outer RTL context of the block.
>>
>>                     In general, you can use the fo:bidi-override
>>                     element to both create bidi
>>                     embedding levels and also to override the
>>                     directionality of text as would
>>                     be
>>                     computed by the Unicode bidi algorithm.
>>
>>                     G.
>>
>>                     On Wed, Mar 9, 2011 at 2:28 PM, Glenn
>>                     Adams<glenn@skynav.com <ma...@skynav.com>>
>>                      wrote:
>>
>>                         I have a fix for the block-container issue as
>>                         well, which I will commit
>>                         shortly to my GIT repo. The problem was that
>>                         earlier (pre complex script)
>>                         code apparently assumed that right-to-left
>>                         writing mode was handled by
>>                         mirroring the CTM around the y axis, so it
>>                         was setting the CTM
>>                         incorrectly
>>                         for the viewport area generated by
>>                         block-container. In fact there is no
>>                         relationship between WM and reference
>>                         orientation (and thus CTM on
>>                         viewport
>>                         area).
>>
>>                         I'll let you know when I've made the commit.
>>
>>                         G.
>>
>>
>>                         On Wed, Mar 9, 2011 at 2:10 PM, Matthias
>>                         Reischenbacher<
>>                         matthias8283@gmx.at
>>                         <ma...@gmx.at>>  wrote:
>>
>>
>>                             Ok, thanks a lot for your help!
>>                             Matthias
>>
>>
>>                             Glenn Adams-2 wrote:
>>
>>
>>                                 It appears the problem is due to a
>>                                 bug related to the use of
>>                                 block-container, which I will look
>>                                 into. However, if you remove
>>                                 block-container, and put the
>>                                 writing-mode and (default) font-family on
>>                                 fo:page-sequence, it should produce
>>                                 correct results. See attached for
>>
>>                             what
>>
>>                                 I'm getting (using the current GITHUB
>>                                 repo) with a modified FO.
>>
>>                                 I would advise you use the GIT
>>                                 repository for now, because it is kept
>>
>>                             up
>>
>>                                 to
>>                                 date with my working copy. I submit a
>>                                 patch irregularly for
>>
>>                             integration
>>
>>                                 into
>>                                 the SVN Temp_ComplexScripts branch.
>>
>>                                 G.
>>
>>                                 On Wed, Mar 9, 2011 at 12:21 PM,
>>                                 Matthias Reischenbacher<
>>                                 matthias8283@gmx.at
>>                                 <ma...@gmx.at>>  wrote:
>>
>>
>>                                     Glenn,
>>
>>                                     here it goes:
>>                                     Fo file:
>>                                     http://old.nabble.com/file/p31109566/hebrew_test.xml
>>                                     hebrew_test.xml
>>                                     PDF file:
>>                                     http://old.nabble.com/file/p31109566/hebrew_test.pdf
>>                                     hebrew_test.pdf
>>
>>                                     Should I try building your code
>>                                     on git hub? I've never used git
>>
>>                             therefore
>>
>>                                     I
>>                                     first went with the apache SVN
>>                                     branch.
>>
>>                                     Thanks&  Regards,
>>                                     Matthias
>>
>>
>>                                     Glenn Adams-2 wrote:
>>
>>
>>                                         Matthias,
>>
>>                                         Thanks for the report. Could
>>                                         you send me the FO input file
>>                                         and PDF
>>
>>                                     output
>>
>>                                         file? I am actively testing
>>                                         and fixing the Bidi and
>>                                         Script support,
>>
>>                                     with
>>
>>                                         real-time updates occurring
>>                                         at
>>                                         git://github.com/skynavga/fop.git
>>                                         <http://github.com/skynavga/fop.git>.
>>
>>                                         Regards,
>>                                         Glenn
>>
>>                                         On Wed, Mar 9, 2011 at 11:28
>>                                         AM, Matthias Reischenbacher<
>>                                         matthias8283@gmx.at
>>                                         <ma...@gmx.at>>
>>                                          wrote:
>>
>>
>>                                             Glenn,
>>
>>                                             I tried your work today
>>                                             of the complex script
>>                                             branch. I managed to
>>                                             generate
>>                                             a PDF file with Hebrew
>>                                             text using Arial Unicode
>>                                             MS font and
>>
>>                                     writing-mode
>>
>>                                             set
>>                                             to rl-tb. The Hebrew text
>>                                             is displayed fine but
>>                                             english characters
>>
>>                             are
>>
>>                                             also
>>                                             mirrored. Do I have to
>>                                             set an additional xsl-fo
>>                                             attribute in order
>>
>>                             to
>>
>>                                             correctly display english
>>                                             characters or is the BIDI
>>                                             text algorithm
>>
>>                             not
>>
>>                                             yet
>>                                             implemented?
>>
>>                                             Thanks for your help,
>>                                             Matthias Reischenbacher
>>                                             --
>>                                             View this message in context:
>>
>>
>>                             http://old.nabble.com/Complex-Script%2C-BIDI-text-supported--tp31109094p31109094.html
>>
>>                                             Sent from the FOP - Users
>>                                             mailing list archive at
>>                                             Nabble.com.
>>
>>
>>
>>                             ---------------------------------------------------------------------
>>
>>                                             To unsubscribe, e-mail:
>>
>>                             fop-users-unsubscribe@xmlgraphics.apache.org
>>                             <ma...@xmlgraphics.apache.org>
>>
>>                                             For additional commands,
>>                                             e-mail:
>>
>>                             fop-users-help@xmlgraphics.apache.org
>>                             <ma...@xmlgraphics.apache.org>
>>
>>
>>
>>
>>
>>
>>                                     --
>>                                     View this message in context:
>>
>>                             http://old.nabble.com/Complex-Script%2C-BIDI-text-supported--tp31109094p31109566.html
>>
>>                                     Sent from the FOP - Users mailing
>>                                     list archive at Nabble.com.
>>
>>
>>                                     ---------------------------------------------------------------------
>>                                     To unsubscribe, e-mail:
>>                                     fop-users-unsubscribe@xmlgraphics.apache.org
>>                                     <ma...@xmlgraphics.apache.org>
>>                                     For additional commands, e-mail:
>>
>>                             fop-users-help@xmlgraphics.apache.org
>>                             <ma...@xmlgraphics.apache.org>
>>
>>
>>
>>
>>                                 <?xml version="1.0" encoding="UTF-8"?>
>>                                 <fo:root
>>                                 xmlns:fo="http://www.w3.org/1999/XSL/Format">
>>                                 <fo:layout-master-set>
>>                                 <fo:simple-page-master
>>                                 master-name="simple" page-height="5in"
>>                                 page-width="5in">
>>                                 <fo:region-body/>
>>                                 </fo:simple-page-master>
>>                                 </fo:layout-master-set>
>>                                 <fo:page-sequence
>>                                 master-reference="simple"
>>                                 writing-mode="rl-tb"
>>                                 font-family="Arial Unicode MS">
>>                                 <fo:flow flow-name="xsl-region-body">
>>                                 <fo:block>חוברת הוראות בטיחות זו
>>                                 מתמקדת בכמה מהמצבים העקרוניים
>>                                 שעשויים להתרחש בעת הפעלת המכונה
>>                                 ותחזוקתה.</fo:block>
>>                                 <fo:block>Test</fo:block>
>>                                 </fo:flow>
>>                                 </fo:page-sequence>
>>                                 </fo:root>
>>
>>
>>
>>                                 ---------------------------------------------------------------------
>>                                 To unsubscribe, e-mail:
>>                                 fop-users-unsubscribe@xmlgraphics.apache.org
>>                                 <ma...@xmlgraphics.apache.org>
>>                                 For additional commands, e-mail:
>>                                 fop-users-help@xmlgraphics.apache.org
>>                                 <ma...@xmlgraphics.apache.org>
>>
>>
>>                             --
>>                             View this message in context:
>>                             http://old.nabble.com/Complex-Script%2C-BIDI-text-supported--tp31109094p31110436.html
>>                             Sent from the FOP - Users mailing list
>>                             archive at Nabble.com.
>>
>>
>>                             ---------------------------------------------------------------------
>>                             To unsubscribe, e-mail:
>>                             fop-users-unsubscribe@xmlgraphics.apache.org
>>                             <ma...@xmlgraphics.apache.org>
>>                             For additional commands, e-mail:
>>                             fop-users-help@xmlgraphics.apache.org
>>                             <ma...@xmlgraphics.apache.org>
>>
>>
>>
>>
>>
>>
>>
>>
>>             ---------------------------------------------------------------------
>>             To unsubscribe, e-mail:
>>             fop-users-unsubscribe@xmlgraphics.apache.org
>>             <ma...@xmlgraphics.apache.org>
>>             For additional commands, e-mail:
>>             fop-users-help@xmlgraphics.apache.org
>>             <ma...@xmlgraphics.apache.org>
>>
>>
>>
>

Re: Complex Script, BIDI text supported?

Posted by Glenn Adams <gl...@skynav.com>.
Matthias,

Thanks. Yes, it would be helpful if you could send me minimal test cases for
these issues, so I can address them.

Regards,
Glenn

On Fri, May 13, 2011 at 5:58 AM, Matthias Reischenbacher <
matthias8283@gmx.at> wrote:

>  Hi Glenn,
>
> I've tested your git branch and the following additional issues came up:
>
> 1. fo:basic-links with internal destination don't work
> 2. fo:page-number references only sometimes work
> 3. start-indent on fo:block with a block-container child isn't taken into
> account.
>
> Please let me know, if you want me to prepare a test case showing all three
> issues.
>
>
> Best regards,
> Matthias
>
> On 31.03.2011 00:43, Glenn Adams wrote:
>
> Matthias,
>
>  I just updated my working repo git://github.com/skynavga/fop.git with
> fixes for fo:table and fo:list-block to account for RTL writing modes; i.e.,
> table column progression and list-item (label and body) alignment are now
> RTL in RTL WM contexts.
>
>  In the process, I uncovered two other issues as well, which I am now
> working on along with the fo:character problem you reported:
>
>    - fo:block-container does not align right in a RTL WM context when it
>    does not use absolute or fixed positioning;
>    - fo:leader is not working in a RTL WM context;
>
> I will update you when I have fixes committed for these issues.
>
>  G.
>
> On Wed, Mar 23, 2011 at 6:45 AM, Glenn Adams <gl...@skynav.com> wrote:
>
>> Thanks for uncovering these issues. Let me address them and I'll let you
>> know when they are fixed in my GIT repo. Perhaps after that I can submit a
>> new patch update for the SVN branch.
>>
>>  G.
>>
>>
>>  2011/3/23 Matthias Reischenbacher <ma...@gmx.at>
>>
>>> Glenn,
>>>
>>> I just tested a little bit more and the following questions/problems came
>>> up:
>>>
>>> 1. Are table cells also supposed to flow from right to left in "rl-tb"
>>> writing-mode?
>>>
>>> 2. Shouldn't list-item labels be displayed on the right side?
>>>
>>> 3. fo:character seem to overlap in rl mode.
>>>
>>> I'm attaching a new test file and the current PDF output.
>>>
>>> Thanks,
>>>  Matthias
>>>
>>>
>>> On 22.03.2011 18:27, Matthias Reischenbacher wrote:
>>>
>>>>
>>>> Hi Glenn,
>>>>
>>>> thanks again for your help and doing all those fixes. Today I've
>>>> retested my
>>>> sample file with the git branch and everything works fine now. I'll do
>>>> some
>>>> more testing in the next weeks and I'll let you know if I encounter any
>>>> problems.
>>>>
>>>> Are you planning to submit a new patch for the apache svn repo anytime
>>>> soon?
>>>> If not, no problem. I'm just asking because I have some local
>>>> modifications
>>>> in my svn working copy which I'll have to apply manually to the git
>>>> working
>>>> copy.
>>>>
>>>> Thanks&  best regards,
>>>> Matthias
>>>>
>>>>
>>>> Glenn Adams-2 wrote:
>>>>
>>>>>
>>>>> Matthias,
>>>>>
>>>>> I've fixed the fo:block-container problem as well as text-align and
>>>>> treatment of writing-mode on page regions. The fixes are present in my
>>>>> GIT
>>>>> repo I referred to earlier  (and also include all trunk commits up to
>>>>> this
>>>>> point). To be a little more detailed:
>>>>>
>>>>>    - the use of writing-mode="rl" on simple-page-master now results in
>>>>>    correct interpretation of region-start and region end; i.e.,
>>>>> region-start is
>>>>>    now on the right side of the page (with 0 reference orientation),
>>>>> and
>>>>>    region-end is on the left side;
>>>>>    - the erroneous (historical) mirroring around the y axis of
>>>>> viewports
>>>>>    with writing-mode="rl", including those generated by region-* and
>>>>>    block-container, has been removed;
>>>>>    - both text-align and text-align-last now treat start and end as
>>>>> relative
>>>>>    to the writing mode, e.g., text-align="start" is on the right when
>>>>>    writing-mode="rl", etc.
>>>>>    - if no text-align is specified, then in a writing-mode="rl" context
>>>>>    correctly results in right (i.e., start) alignment, while in "lr"
>>>>> start
>>>>> is
>>>>>    on left (assuming reference orientation of 0);
>>>>>
>>>>> I am aware of an existing problem with text-align="justify" in RTL WM
>>>>> contexts, and expect a fix in a day or so.
>>>>>
>>>>> Let me know if you encounter any other bidi problems. Also, just as a
>>>>> reminder, a neutral character, e.g., FULL STOP '.', at the end of a
>>>>> paragraph in a block takes on the default direction of the block. So,
>>>>> if
>>>>> you
>>>>> have a block of English text with a period at the end and it appears in
>>>>> a
>>>>> RTL WM context, then the period will be placed at the left of the last
>>>>> line,
>>>>> not the right as one might expect. This is actually correct behavior,
>>>>> and
>>>>> is
>>>>> a side effect of the Unicode bidi algorithm. To deal with this, you can
>>>>> wrap
>>>>> the English text including the period with<fo:bidi-override
>>>>> unicode-bidi="embed" direction="ltr">Sentence(s) with a period at the
>>>>> end.</fo:bidi-override>. This will create a LTR embedding context in
>>>>> the
>>>>> outer RTL context of the block.
>>>>>
>>>>> In general, you can use the fo:bidi-override element to both create
>>>>> bidi
>>>>> embedding levels and also to override the directionality of text as
>>>>> would
>>>>> be
>>>>> computed by the Unicode bidi algorithm.
>>>>>
>>>>> G.
>>>>>
>>>>> On Wed, Mar 9, 2011 at 2:28 PM, Glenn Adams<gl...@skynav.com>  wrote:
>>>>>
>>>>>  I have a fix for the block-container issue as well, which I will
>>>>>> commit
>>>>>> shortly to my GIT repo. The problem was that earlier (pre complex
>>>>>> script)
>>>>>> code apparently assumed that right-to-left writing mode was handled by
>>>>>> mirroring the CTM around the y axis, so it was setting the CTM
>>>>>> incorrectly
>>>>>> for the viewport area generated by block-container. In fact there is
>>>>>> no
>>>>>> relationship between WM and reference orientation (and thus CTM on
>>>>>> viewport
>>>>>> area).
>>>>>>
>>>>>> I'll let you know when I've made the commit.
>>>>>>
>>>>>> G.
>>>>>>
>>>>>>
>>>>>> On Wed, Mar 9, 2011 at 2:10 PM, Matthias Reischenbacher<
>>>>>> matthias8283@gmx.at>  wrote:
>>>>>>
>>>>>>
>>>>>>> Ok, thanks a lot for your help!
>>>>>>> Matthias
>>>>>>>
>>>>>>>
>>>>>>> Glenn Adams-2 wrote:
>>>>>>>
>>>>>>>>
>>>>>>>> It appears the problem is due to a bug related to the use of
>>>>>>>> block-container, which I will look into. However, if you remove
>>>>>>>> block-container, and put the writing-mode and (default) font-family
>>>>>>>> on
>>>>>>>> fo:page-sequence, it should produce correct results. See attached
>>>>>>>> for
>>>>>>>>
>>>>>>> what
>>>>>>>
>>>>>>>> I'm getting (using the current GITHUB repo) with a modified FO.
>>>>>>>>
>>>>>>>> I would advise you use the GIT repository for now, because it is
>>>>>>>> kept
>>>>>>>>
>>>>>>> up
>>>>>>>
>>>>>>>> to
>>>>>>>> date with my working copy. I submit a patch irregularly for
>>>>>>>>
>>>>>>> integration
>>>>>>>
>>>>>>>> into
>>>>>>>> the SVN Temp_ComplexScripts branch.
>>>>>>>>
>>>>>>>> G.
>>>>>>>>
>>>>>>>> On Wed, Mar 9, 2011 at 12:21 PM, Matthias Reischenbacher<
>>>>>>>> matthias8283@gmx.at>  wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>> Glenn,
>>>>>>>>>
>>>>>>>>> here it goes:
>>>>>>>>> Fo file:  http://old.nabble.com/file/p31109566/hebrew_test.xml
>>>>>>>>> hebrew_test.xml
>>>>>>>>> PDF file:  http://old.nabble.com/file/p31109566/hebrew_test.pdf
>>>>>>>>> hebrew_test.pdf
>>>>>>>>>
>>>>>>>>> Should I try building your code on git hub? I've never used git
>>>>>>>>>
>>>>>>>>  therefore
>>>>>>>
>>>>>>>>  I
>>>>>>>>> first went with the apache SVN branch.
>>>>>>>>>
>>>>>>>>> Thanks&  Regards,
>>>>>>>>> Matthias
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Glenn Adams-2 wrote:
>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Matthias,
>>>>>>>>>>
>>>>>>>>>> Thanks for the report. Could you send me the FO input file and PDF
>>>>>>>>>>
>>>>>>>>> output
>>>>>>>>>
>>>>>>>>>> file? I am actively testing and fixing the Bidi and Script
>>>>>>>>>> support,
>>>>>>>>>>
>>>>>>>>> with
>>>>>>>>>
>>>>>>>>>> real-time updates occurring at git://github.com/skynavga/fop.git.
>>>>>>>>>>
>>>>>>>>>> Regards,
>>>>>>>>>> Glenn
>>>>>>>>>>
>>>>>>>>>> On Wed, Mar 9, 2011 at 11:28 AM, Matthias Reischenbacher<
>>>>>>>>>> matthias8283@gmx.at>  wrote:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>> Glenn,
>>>>>>>>>>>
>>>>>>>>>>> I tried your work today of the complex script branch. I managed
>>>>>>>>>>> to
>>>>>>>>>>> generate
>>>>>>>>>>> a PDF file with Hebrew text using Arial Unicode MS font and
>>>>>>>>>>>
>>>>>>>>>>  writing-mode
>>>>>>>>>
>>>>>>>>>>  set
>>>>>>>>>>> to rl-tb. The Hebrew text is displayed fine but english
>>>>>>>>>>> characters
>>>>>>>>>>>
>>>>>>>>>>   are
>>>>>>>
>>>>>>>>   also
>>>>>>>>>>> mirrored. Do I have to set an additional xsl-fo attribute in
>>>>>>>>>>> order
>>>>>>>>>>>
>>>>>>>>>>   to
>>>>>>>
>>>>>>>>   correctly display english characters or is the BIDI text
>>>>>>>>>>> algorithm
>>>>>>>>>>>
>>>>>>>>>>   not
>>>>>>>
>>>>>>>>   yet
>>>>>>>>>>> implemented?
>>>>>>>>>>>
>>>>>>>>>>> Thanks for your help,
>>>>>>>>>>> Matthias Reischenbacher
>>>>>>>>>>> --
>>>>>>>>>>> View this message in context:
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>
>>>>>>> http://old.nabble.com/Complex-Script%2C-BIDI-text-supported--tp31109094p31109094.html
>>>>>>>
>>>>>>>>   Sent from the FOP - Users mailing list archive at Nabble.com.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>>
>>>>>>>>   To unsubscribe, e-mail:
>>>>>>>>>>>
>>>>>>>>>>   fop-users-unsubscribe@xmlgraphics.apache.org
>>>>>>>
>>>>>>>>   For additional commands, e-mail:
>>>>>>>>>>>
>>>>>>>>>>   fop-users-help@xmlgraphics.apache.org
>>>>>>>
>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> View this message in context:
>>>>>>>>>
>>>>>>>>>
>>>>>>> http://old.nabble.com/Complex-Script%2C-BIDI-text-supported--tp31109094p31109566.html
>>>>>>>
>>>>>>>>  Sent from the FOP - Users mailing list archive at Nabble.com.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>> To unsubscribe, e-mail:
>>>>>>>>> fop-users-unsubscribe@xmlgraphics.apache.org
>>>>>>>>> For additional commands, e-mail:
>>>>>>>>>
>>>>>>>>  fop-users-help@xmlgraphics.apache.org
>>>>>>>
>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
>>>>>>>>   <fo:layout-master-set>
>>>>>>>>     <fo:simple-page-master master-name="simple" page-height="5in"
>>>>>>>> page-width="5in">
>>>>>>>>       <fo:region-body/>
>>>>>>>>     </fo:simple-page-master>
>>>>>>>>   </fo:layout-master-set>
>>>>>>>>   <fo:page-sequence master-reference="simple" writing-mode="rl-tb"
>>>>>>>> font-family="Arial Unicode MS">
>>>>>>>>     <fo:flow flow-name="xsl-region-body">
>>>>>>>>       <fo:block>חוברת הוראות בטיחות זו מתמקדת בכמה מהמצבים העקרוניים
>>>>>>>> שעשויים להתרחש בעת הפעלת המכונה ותחזוקתה.</fo:block>
>>>>>>>>       <fo:block>Test</fo:block>
>>>>>>>>     </fo:flow>
>>>>>>>>   </fo:page-sequence>
>>>>>>>> </fo:root>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> ---------------------------------------------------------------------
>>>>>>>> To unsubscribe, e-mail:
>>>>>>>> fop-users-unsubscribe@xmlgraphics.apache.org
>>>>>>>> For additional commands, e-mail:
>>>>>>>> fop-users-help@xmlgraphics.apache.org
>>>>>>>>
>>>>>>>>
>>>>>>> --
>>>>>>> View this message in context:
>>>>>>>
>>>>>>> http://old.nabble.com/Complex-Script%2C-BIDI-text-supported--tp31109094p31110436.html
>>>>>>> Sent from the FOP - Users mailing list archive at Nabble.com.
>>>>>>>
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>>>>>>> For additional commands, e-mail:
>>>>>>> fop-users-help@xmlgraphics.apache.org
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>>> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>>>
>>
>>
>

Re: Complex Script, BIDI text supported?

Posted by Glenn Adams <gl...@skynav.com>.
You can track the status of these defects at:

   - right-to-left page numbering -
   http://skynav.trac.cvsdude.com/fop/ticket/33
   - right-to-left flow column progression -
   http://skynav.trac.cvsdude.com/fop/ticket/34

Regards,
Glenn

On Fri, May 13, 2011 at 9:27 AM, Glenn Adams <gl...@skynav.com> wrote:

> Ah, sorry, was reading too quickly. Column progression in a page does
> indeed NOT yet make use of writing mode. I will add this to my
> defect/feature tracking list for this work, which I am in the process of
> updating now.
>
> Regards,
> Glenn
>
>
> On Fri, May 13, 2011 at 8:49 AM, Theresa Jayne Forster <
> theresa@inbrand.co.uk> wrote:
>
>> Sorry if I didn’t put it in terms you could easily understand but I am
>> making a variable 30+ page document with Flow and columns=”2” so not using
>> tables at all. The generic flow of a page needs to be from “as we see it”
>> back to front – right to left so on a 2 column page it needs to go right
>> hand column to left
>>
>>
>>
>> Theresa
>>
>> *From:* Glenn Adams [mailto:glenn@skynav.com]
>> *Sent:* 13 May 2011 15:40
>>
>> *To:* fop-users@xmlgraphics.apache.org
>> *Subject:* Re: Complex Script, BIDI text supported?
>>
>>
>>
>> Theresa,
>>
>>
>>
>> The current code in git://github.com/skynavga/fop.git DOES handle
>> right-to-left column progression in fo:table. You need to ensure that the
>> appropriate writing mode is specified on fo:table or on the nearest ancestor
>> fo:block-container or on fo:page-sequence.
>>
>>
>>
>> I have NOT yet implemented changes needed to reverse page numbering, but
>> it is on my list of TODO items. Thanks for reminding me.
>>
>>
>>
>> Regards,
>>
>> Glenn
>>
>> On Fri, May 13, 2011 at 7:26 AM, Theresa Jayne Forster <
>> theresa@inbrand.co.uk> wrote:
>>
>> Once I have the normal one set up I will be looking at the bidi (we need
>> it for Arabic) the one sticking point for us is we need the page numbering
>> reversed on the <fo:page-number/> and also for a multi column document we
>> need it to go Right to left, does the git version have this? Or is that
>> still in development?
>>
>>
>>
>> Theresa Forster
>>
>> *From:* Matthias Reischenbacher [mailto:matthias8283@gmx.at]
>> *Sent:* 13 May 2011 12:58
>> *To:* fop-users@xmlgraphics.apache.org
>> *Subject:* Re: Complex Script, BIDI text supported?
>>
>>
>>
>> Hi Glenn,
>>
>> I've tested your git branch and the following additional issues came up:
>>
>> 1. fo:basic-links with internal destination don't work
>> 2. fo:page-number references only sometimes work
>> 3. start-indent on fo:block with a block-container child isn't taken into
>> account.
>>
>> Please let me know, if you want me to prepare a test case showing all
>> three issues.
>>
>> Best regards,
>> Matthias
>>
>> On 31.03.2011 00:43, Glenn Adams wrote:
>>
>> Matthias,
>>
>>
>>
>> I just updated my working repo git://github.com/skynavga/fop.git with
>> fixes for fo:table and fo:list-block to account for RTL writing modes; i.e.,
>> table column progression and list-item (label and body) alignment are now
>> RTL in RTL WM contexts..
>>
>>
>>
>> In the process, I uncovered two other issues as well, which I am now
>> working on along with the fo:character problem you reported:
>>
>>    - fo:block-container does not align right in a RTL WM context when it
>>    does not use absolute or fixed positioning;
>>    - fo:leader is not working in a RTL WM context;
>>
>>  I will update you when I have fixes committed for these issues.
>>
>>
>>
>> G.
>>
>>
>>
>> On Wed, Mar 23, 2011 at 6:45 AM, Glenn Adams <gl...@skynav.com> wrote:
>>
>> Thanks for uncovering these issues. Let me address them and I'll let you
>> know when they are fixed in my GIT repo. Perhaps after that I can submit a
>> new patch update for the SVN branch.
>>
>>
>>
>> G..
>>
>>
>>
>> 2011/3/23 Matthias Reischenbacher <ma...@gmx.at>
>>
>> Glenn,
>>
>> I just tested a little bit more and the following questions/problems came
>> up:
>>
>> 1. Are table cells also supposed to flow from right to left in "rl-tb"
>> writing-mode?
>>
>> 2. Shouldn't list-item labels be displayed on the right side?
>>
>> 3. fo:character seem to overlap in rl mode.
>>
>> I'm attaching a new test file and the current PDF output.
>>
>> Thanks,
>> Matthias
>>
>>
>>
>> On 22.03.2011 18:27, Matthias Reischenbacher wrote:
>>
>>
>> Hi Glenn,
>>
>> thanks again for your help and doing all those fixes. Today I've retested
>> my
>> sample file with the git branch and everything works fine now. I'll do
>> some
>> more testing in the next weeks and I'll let you know if I encounter any
>> problems.
>>
>> Are you planning to submit a new patch for the apache svn repo anytime
>> soon?
>> If not, no problem. I'm just asking because I have some local
>> modifications
>> in my svn working copy which I'll have to apply manually to the git
>> working
>> copy.
>>
>> Thanks&  best regards,
>> Matthias
>>
>>
>> Glenn Adams-2 wrote:
>>
>>
>> Matthias,
>>
>> I've fixed the fo:block-container problem as well as text-align and
>> treatment of writing-mode on page regions. The fixes are present in my GIT
>> repo I referred to earlier  (and also include all trunk commits up to this
>> point). To be a little more detailed:
>>
>>    - the use of writing-mode="rl" on simple-page-master now results in
>>    correct interpretation of region-start and region end; i.e.,
>> region-start is
>>    now on the right side of the page (with 0 reference orientation), and
>>    region-end is on the left side;
>>    - the erroneous (historical) mirroring around the y axis of viewports
>>    with writing-mode="rl", including those generated by region-* and
>>    block-container, has been removed;
>>    - both text-align and text-align-last now treat start and end as
>> relative
>>    to the writing mode, e.g., text-align="start" is on the right when
>>    writing-mode="rl", etc.
>>    - if no text-align is specified, then in a writing-mode="rl" context
>>    correctly results in right (i.e., start) alignment, while in "lr" start
>> is
>>    on left (assuming reference orientation of 0);
>>
>> I am aware of an existing problem with text-align="justify" in RTL WM
>> contexts, and expect a fix in a day or so.
>>
>> Let me know if you encounter any other bidi problems. Also, just as a
>> reminder, a neutral character, e.g., FULL STOP '.', at the end of a
>> paragraph in a block takes on the default direction of the block. So, if
>> you
>> have a block of English text with a period at the end and it appears in a
>> RTL WM context, then the period will be placed at the left of the last
>> line,
>> not the right as one might expect. This is actually correct behavior, and
>> is
>> a side effect of the Unicode bidi algorithm. To deal with this, you can
>> wrap
>> the English text including the period with<fo:bidi-override
>> unicode-bidi="embed" direction="ltr">Sentence(s) with a period at the
>> end.</fo:bidi-override>. This will create a LTR embedding context in the
>> outer RTL context of the block.
>>
>> In general, you can use the fo:bidi-override element to both create bidi
>> embedding levels and also to override the directionality of text as would
>> be
>> computed by the Unicode bidi algorithm.
>>
>> G.
>>
>> On Wed, Mar 9, 2011 at 2:28 PM, Glenn Adams<gl...@skynav.com>  wrote:
>>
>> I have a fix for the block-container issue as well, which I will commit
>> shortly to my GIT repo. The problem was that earlier (pre complex script)
>> code apparently assumed that right-to-left writing mode was handled by
>> mirroring the CTM around the y axis, so it was setting the CTM
>> incorrectly
>> for the viewport area generated by block-container. In fact there is no
>> relationship between WM and reference orientation (and thus CTM on
>> viewport
>> area).
>>
>> I'll let you know when I've made the commit.
>>
>> G.
>>
>>
>> On Wed, Mar 9, 2011 at 2:10 PM, Matthias Reischenbacher<
>> matthias8283@gmx.at>  wrote:
>>
>>
>> Ok, thanks a lot for your help!
>> Matthias
>>
>>
>> Glenn Adams-2 wrote:
>>
>>
>> It appears the problem is due to a bug related to the use of
>> block-container, which I will look into. However, if you remove
>> block-container, and put the writing-mode and (default) font-family on
>> fo:page-sequence, it should produce correct results. See attached for
>>
>> what
>>
>> I'm getting (using the current GITHUB repo) with a modified FO.
>>
>> I would advise you use the GIT repository for now, because it is kept
>>
>> up
>>
>> to
>> date with my working copy. I submit a patch irregularly for
>>
>> integration
>>
>> into
>> the SVN Temp_ComplexScripts branch.
>>
>> G.
>>
>> On Wed, Mar 9, 2011 at 12:21 PM, Matthias Reischenbacher<
>> matthias8283@gmx.at>  wrote:
>>
>>
>> Glenn,
>>
>> here it goes:
>> Fo file:  http://old.nabble.com/file/p31109566/hebrew_test.xml
>> hebrew_test.xml
>> PDF file:  http://old.nabble.com/file/p31109566/hebrew_test.pdf<http://old.nabble.com/file/p31109566/hebrew_test..pdf>
>> hebrew_test.pdf
>>
>> Should I try building your code on git hub? I've never used git
>>
>> therefore
>>
>> I
>> first went with the apache SVN branch.
>>
>> Thanks&  Regards,
>> Matthias
>>
>>
>> Glenn Adams-2 wrote:
>>
>>
>> Matthias,
>>
>> Thanks for the report. Could you send me the FO input file and PDF
>>
>> output
>>
>> file? I am actively testing and fixing the Bidi and Script support,
>>
>> with
>>
>> real-time updates occurring at git://github.com/skynavga/fop.git.
>>
>> Regards,
>> Glenn
>>
>> On Wed, Mar 9, 2011 at 11:28 AM, Matthias Reischenbacher<
>> matthias8283@gmx..at <ma...@gmx.at>>  wrote:
>>
>>
>> Glenn,
>>
>> I tried your work today of the complex script branch. I managed to
>> generate
>> a PDF file with Hebrew text using Arial Unicode MS font and
>>
>> writing-mode
>>
>> set
>> to rl-tb. The Hebrew text is displayed fine but english characters
>>
>> are
>>
>>  also
>> mirrored. Do I have to set an additional xsl-fo attribute in order
>>
>> to
>>
>>  correctly display english characters or is the BIDI text algorithm
>>
>> not
>>
>>  yet
>> implemented?
>>
>> Thanks for your help,
>> Matthias Reischenbacher
>> --
>> View this message in context:
>>
>>
>>
>>
>> http://old.nabble.com/Complex-Script%2C-BIDI-text-supported--tp31109094p31109094.html
>>
>> Sent from the FOP - Users mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>>
>>  To unsubscribe, e-mail:
>>
>> fop-users-unsubscribe@xmlgraphics.apache.org
>>
>> For additional commands, e-mail:
>>
>> fop-users-help@xmlgraphics.apache.org
>>
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>>
>>
>> http://old.nabble.com/Complex-Script%2C-BIDI-text-supported--tp31109094p31109566.html
>>
>> Sent from the FOP - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org<fo...@xmlgraphics..apache.org>
>> For additional commands, e-mail:
>>
>> fop-users-help@xmlgraphics.apache.org
>>
>>
>>
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
>>   <fo:layout-master-set>
>>     <fo:simple-page-master master-name="simple" page-height="5in"
>> page-width="5in">
>>       <fo:region-body/>
>>     </fo:simple-page-master>
>>   </fo:layout-master-set>
>>   <fo:page-sequence master-reference="simple" writing-mode="rl-tb"
>> font-family="Arial Unicode MS">
>>     <fo:flow flow-name="xsl-region-body">
>>       <fo:block>חוברת הוראות בטיחות זו מתמקדת בכמה מהמצבים העקרוניים
>> שעשויים להתרחש בעת הפעלת המכונה ותחזוקתה.</fo:block>
>>       <fo:block>Test</fo:block>
>>     </fo:flow>
>>   </fo:page-sequence>
>> </fo:root>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>>
>>
>> --
>> View this message in context:
>>
>> http://old.nabble.com/Complex-Script%2C-BIDI-text-supported--tp31109094p31110436.html
>> Sent from the FOP - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>>
>>
>>
>>
>> ------------------------------
>>
>> No virus found in this message.
>> Checked by AVG - www.avg.com
>> Version: 10.0.1325 / Virus Database: 1500/3634 - Release Date: 05/12/11
>>
>>
>>
>>
>> ------------------------------
>> ------------------------------
>>
>> No virus found in this message.
>> Checked by AVG - www.avg.com
>> Version: 10.0.1325 / Virus Database: 1500/3634 - Release Date: 05/12/11
>>
>
>

Re: Complex Script, BIDI text supported?

Posted by Glenn Adams <gl...@skynav.com>.
Ah, sorry, was reading too quickly. Column progression in a page does indeed
NOT yet make use of writing mode. I will add this to my defect/feature
tracking list for this work, which I am in the process of updating now.

Regards,
Glenn

On Fri, May 13, 2011 at 8:49 AM, Theresa Jayne Forster <
theresa@inbrand.co.uk> wrote:

> Sorry if I didn’t put it in terms you could easily understand but I am
> making a variable 30+ page document with Flow and columns=”2” so not using
> tables at all. The generic flow of a page needs to be from “as we see it”
> back to front – right to left so on a 2 column page it needs to go right
> hand column to left
>
>
>
> Theresa
>
> *From:* Glenn Adams [mailto:glenn@skynav.com]
> *Sent:* 13 May 2011 15:40
>
> *To:* fop-users@xmlgraphics.apache.org
> *Subject:* Re: Complex Script, BIDI text supported?
>
>
>
> Theresa,
>
>
>
> The current code in git://github.com/skynavga/fop.git DOES handle
> right-to-left column progression in fo:table. You need to ensure that the
> appropriate writing mode is specified on fo:table or on the nearest ancestor
> fo:block-container or on fo:page-sequence.
>
>
>
> I have NOT yet implemented changes needed to reverse page numbering, but it
> is on my list of TODO items. Thanks for reminding me.
>
>
>
> Regards,
>
> Glenn
>
> On Fri, May 13, 2011 at 7:26 AM, Theresa Jayne Forster <
> theresa@inbrand.co.uk> wrote:
>
> Once I have the normal one set up I will be looking at the bidi (we need it
> for Arabic) the one sticking point for us is we need the page numbering
> reversed on the <fo:page-number/> and also for a multi column document we
> need it to go Right to left, does the git version have this? Or is that
> still in development?
>
>
>
> Theresa Forster
>
> *From:* Matthias Reischenbacher [mailto:matthias8283@gmx.at]
> *Sent:* 13 May 2011 12:58
> *To:* fop-users@xmlgraphics.apache.org
> *Subject:* Re: Complex Script, BIDI text supported?
>
>
>
> Hi Glenn,
>
> I've tested your git branch and the following additional issues came up:
>
> 1. fo:basic-links with internal destination don't work
> 2. fo:page-number references only sometimes work
> 3. start-indent on fo:block with a block-container child isn't taken into
> account.
>
> Please let me know, if you want me to prepare a test case showing all three
> issues.
>
> Best regards,
> Matthias
>
> On 31.03.2011 00:43, Glenn Adams wrote:
>
> Matthias,
>
>
>
> I just updated my working repo git://github.com/skynavga/fop.git with
> fixes for fo:table and fo:list-block to account for RTL writing modes; i.e.,
> table column progression and list-item (label and body) alignment are now
> RTL in RTL WM contexts..
>
>
>
> In the process, I uncovered two other issues as well, which I am now
> working on along with the fo:character problem you reported:
>
>    - fo:block-container does not align right in a RTL WM context when it
>    does not use absolute or fixed positioning;
>    - fo:leader is not working in a RTL WM context;
>
> I will update you when I have fixes committed for these issues.
>
>
>
> G.
>
>
>
> On Wed, Mar 23, 2011 at 6:45 AM, Glenn Adams <gl...@skynav.com> wrote:
>
> Thanks for uncovering these issues. Let me address them and I'll let you
> know when they are fixed in my GIT repo. Perhaps after that I can submit a
> new patch update for the SVN branch.
>
>
>
> G..
>
>
>
> 2011/3/23 Matthias Reischenbacher <ma...@gmx.at>
>
> Glenn,
>
> I just tested a little bit more and the following questions/problems came
> up:
>
> 1. Are table cells also supposed to flow from right to left in "rl-tb"
> writing-mode?
>
> 2. Shouldn't list-item labels be displayed on the right side?
>
> 3. fo:character seem to overlap in rl mode.
>
> I'm attaching a new test file and the current PDF output.
>
> Thanks,
> Matthias
>
>
>
> On 22.03.2011 18:27, Matthias Reischenbacher wrote:
>
>
> Hi Glenn,
>
> thanks again for your help and doing all those fixes. Today I've retested
> my
> sample file with the git branch and everything works fine now. I'll do some
> more testing in the next weeks and I'll let you know if I encounter any
> problems.
>
> Are you planning to submit a new patch for the apache svn repo anytime
> soon?
> If not, no problem. I'm just asking because I have some local modifications
> in my svn working copy which I'll have to apply manually to the git working
> copy.
>
> Thanks&  best regards,
> Matthias
>
>
> Glenn Adams-2 wrote:
>
>
> Matthias,
>
> I've fixed the fo:block-container problem as well as text-align and
> treatment of writing-mode on page regions. The fixes are present in my GIT
> repo I referred to earlier  (and also include all trunk commits up to this
> point). To be a little more detailed:
>
>    - the use of writing-mode="rl" on simple-page-master now results in
>    correct interpretation of region-start and region end; i.e.,
> region-start is
>    now on the right side of the page (with 0 reference orientation), and
>    region-end is on the left side;
>    - the erroneous (historical) mirroring around the y axis of viewports
>    with writing-mode="rl", including those generated by region-* and
>    block-container, has been removed;
>    - both text-align and text-align-last now treat start and end as
> relative
>    to the writing mode, e.g., text-align="start" is on the right when
>    writing-mode="rl", etc.
>    - if no text-align is specified, then in a writing-mode="rl" context
>    correctly results in right (i.e., start) alignment, while in "lr" start
> is
>    on left (assuming reference orientation of 0);
>
> I am aware of an existing problem with text-align="justify" in RTL WM
> contexts, and expect a fix in a day or so.
>
> Let me know if you encounter any other bidi problems. Also, just as a
> reminder, a neutral character, e.g., FULL STOP '.', at the end of a
> paragraph in a block takes on the default direction of the block. So, if
> you
> have a block of English text with a period at the end and it appears in a
> RTL WM context, then the period will be placed at the left of the last
> line,
> not the right as one might expect. This is actually correct behavior, and
> is
> a side effect of the Unicode bidi algorithm. To deal with this, you can
> wrap
> the English text including the period with<fo:bidi-override
> unicode-bidi="embed" direction="ltr">Sentence(s) with a period at the
> end.</fo:bidi-override>. This will create a LTR embedding context in the
> outer RTL context of the block.
>
> In general, you can use the fo:bidi-override element to both create bidi
> embedding levels and also to override the directionality of text as would
> be
> computed by the Unicode bidi algorithm.
>
> G.
>
> On Wed, Mar 9, 2011 at 2:28 PM, Glenn Adams<gl...@skynav.com>  wrote:
>
> I have a fix for the block-container issue as well, which I will commit
> shortly to my GIT repo. The problem was that earlier (pre complex script)
> code apparently assumed that right-to-left writing mode was handled by
> mirroring the CTM around the y axis, so it was setting the CTM
> incorrectly
> for the viewport area generated by block-container. In fact there is no
> relationship between WM and reference orientation (and thus CTM on
> viewport
> area).
>
> I'll let you know when I've made the commit.
>
> G.
>
>
> On Wed, Mar 9, 2011 at 2:10 PM, Matthias Reischenbacher<
> matthias8283@gmx.at>  wrote:
>
>
> Ok, thanks a lot for your help!
> Matthias
>
>
> Glenn Adams-2 wrote:
>
>
> It appears the problem is due to a bug related to the use of
> block-container, which I will look into. However, if you remove
> block-container, and put the writing-mode and (default) font-family on
> fo:page-sequence, it should produce correct results. See attached for
>
> what
>
> I'm getting (using the current GITHUB repo) with a modified FO.
>
> I would advise you use the GIT repository for now, because it is kept
>
> up
>
> to
> date with my working copy. I submit a patch irregularly for
>
> integration
>
> into
> the SVN Temp_ComplexScripts branch.
>
> G.
>
> On Wed, Mar 9, 2011 at 12:21 PM, Matthias Reischenbacher<
> matthias8283@gmx.at>  wrote:
>
>
> Glenn,
>
> here it goes:
> Fo file:  http://old.nabble.com/file/p31109566/hebrew_test.xml
> hebrew_test.xml
> PDF file:  http://old.nabble.com/file/p31109566/hebrew_test.pdf<http://old.nabble.com/file/p31109566/hebrew_test..pdf>
> hebrew_test.pdf
>
> Should I try building your code on git hub? I've never used git
>
> therefore
>
> I
> first went with the apache SVN branch.
>
> Thanks&  Regards,
> Matthias
>
>
> Glenn Adams-2 wrote:
>
>
> Matthias,
>
> Thanks for the report. Could you send me the FO input file and PDF
>
> output
>
> file? I am actively testing and fixing the Bidi and Script support,
>
> with
>
> real-time updates occurring at git://github.com/skynavga/fop.git.
>
> Regards,
> Glenn
>
> On Wed, Mar 9, 2011 at 11:28 AM, Matthias Reischenbacher<
> matthias8283@gmx..at <ma...@gmx.at>>  wrote:
>
>
> Glenn,
>
> I tried your work today of the complex script branch. I managed to
> generate
> a PDF file with Hebrew text using Arial Unicode MS font and
>
> writing-mode
>
> set
> to rl-tb. The Hebrew text is displayed fine but english characters
>
> are
>
>  also
> mirrored. Do I have to set an additional xsl-fo attribute in order
>
> to
>
>  correctly display english characters or is the BIDI text algorithm
>
> not
>
>  yet
> implemented?
>
> Thanks for your help,
> Matthias Reischenbacher
> --
> View this message in context:
>
>
>
>
> http://old.nabble.com/Complex-Script%2C-BIDI-text-supported--tp31109094p31109094.html
>
> Sent from the FOP - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
>
>  To unsubscribe, e-mail:
>
> fop-users-unsubscribe@xmlgraphics.apache.org
>
> For additional commands, e-mail:
>
> fop-users-help@xmlgraphics.apache.org
>
>
>
>
>
>
> --
> View this message in context:
>
>
> http://old.nabble.com/Complex-Script%2C-BIDI-text-supported--tp31109094p31109566.html
>
> Sent from the FOP - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org<fo...@xmlgraphics..apache.org>
> For additional commands, e-mail:
>
> fop-users-help@xmlgraphics.apache.org
>
>
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
>   <fo:layout-master-set>
>     <fo:simple-page-master master-name="simple" page-height="5in"
> page-width="5in">
>       <fo:region-body/>
>     </fo:simple-page-master>
>   </fo:layout-master-set>
>   <fo:page-sequence master-reference="simple" writing-mode="rl-tb"
> font-family="Arial Unicode MS">
>     <fo:flow flow-name="xsl-region-body">
>       <fo:block>חוברת הוראות בטיחות זו מתמקדת בכמה מהמצבים העקרוניים
> שעשויים להתרחש בעת הפעלת המכונה ותחזוקתה.</fo:block>
>       <fo:block>Test</fo:block>
>     </fo:flow>
>   </fo:page-sequence>
> </fo:root>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>
> --
> View this message in context:
>
> http://old.nabble.com/Complex-Script%2C-BIDI-text-supported--tp31109094p31110436.html
> Sent from the FOP - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>
>
>
> ------------------------------
>
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 10.0.1325 / Virus Database: 1500/3634 - Release Date: 05/12/11
>
>
>
>
> ------------------------------
> ------------------------------
>
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 10.0.1325 / Virus Database: 1500/3634 - Release Date: 05/12/11
>

RE: Complex Script, BIDI text supported?

Posted by Theresa Jayne Forster <th...@inbrand.co.uk>.
Sorry if I didn’t put it in terms you could easily understand but I am making a variable 30+ page document with Flow and columns=”2” so not using tables at all. The generic flow of a page needs to be from “as we see it” back to front – right to left so on a 2 column page it needs to go right hand column to left

 

Theresa

From: Glenn Adams [mailto:glenn@skynav.com] 
Sent: 13 May 2011 15:40
To: fop-users@xmlgraphics.apache.org
Subject: Re: Complex Script, BIDI text supported?

 

Theresa,

 

The current code in git://github.com/skynavga/fop.git DOES handle right-to-left column progression in fo:table. You need to ensure that the appropriate writing mode is specified on fo:table or on the nearest ancestor fo:block-container or on fo:page-sequence.

 

I have NOT yet implemented changes needed to reverse page numbering, but it is on my list of TODO items. Thanks for reminding me.

 

Regards,

Glenn

On Fri, May 13, 2011 at 7:26 AM, Theresa Jayne Forster <th...@inbrand.co.uk> wrote:

Once I have the normal one set up I will be looking at the bidi (we need it for Arabic) the one sticking point for us is we need the page numbering reversed on the <fo:page-number/> and also for a multi column document we need it to go Right to left, does the git version have this? Or is that still in development?

 

Theresa Forster

From: Matthias Reischenbacher [mailto:matthias8283@gmx.at] 
Sent: 13 May 2011 12:58
To: fop-users@xmlgraphics.apache.org
Subject: Re: Complex Script, BIDI text supported?

 

Hi Glenn,

I've tested your git branch and the following additional issues came up:

1. fo:basic-links with internal destination don't work
2. fo:page-number references only sometimes work
3. start-indent on fo:block with a block-container child isn't taken into account.

Please let me know, if you want me to prepare a test case showing all three issues.

Best regards,
Matthias

On 31.03.2011 00:43, Glenn Adams wrote: 

Matthias,

 

I just updated my working repo git://github.com/skynavga/fop.git with fixes for fo:table and fo:list-block to account for RTL writing modes; i.e., table column progression and list-item (label and body) alignment are now RTL in RTL WM contexts.. 

 

In the process, I uncovered two other issues as well, which I am now working on along with the fo:character problem you reported:

*	fo:block-container does not align right in a RTL WM context when it does not use absolute or fixed positioning;
*	fo:leader is not working in a RTL WM context;

I will update you when I have fixes committed for these issues.

 

G.

 

On Wed, Mar 23, 2011 at 6:45 AM, Glenn Adams <gl...@skynav.com> wrote:

Thanks for uncovering these issues. Let me address them and I'll let you know when they are fixed in my GIT repo. Perhaps after that I can submit a new patch update for the SVN branch. 

 

G.. 

 

2011/3/23 Matthias Reischenbacher <ma...@gmx.at>

Glenn,

I just tested a little bit more and the following questions/problems came up:

1. Are table cells also supposed to flow from right to left in "rl-tb" writing-mode?

2. Shouldn't list-item labels be displayed on the right side?

3. fo:character seem to overlap in rl mode.

I'm attaching a new test file and the current PDF output.

Thanks,
Matthias 



On 22.03.2011 18:27, Matthias Reischenbacher wrote:


Hi Glenn,

thanks again for your help and doing all those fixes. Today I've retested my
sample file with the git branch and everything works fine now. I'll do some
more testing in the next weeks and I'll let you know if I encounter any
problems.

Are you planning to submit a new patch for the apache svn repo anytime soon?
If not, no problem. I'm just asking because I have some local modifications
in my svn working copy which I'll have to apply manually to the git working
copy.

Thanks&  best regards,
Matthias


Glenn Adams-2 wrote:


Matthias,

I've fixed the fo:block-container problem as well as text-align and
treatment of writing-mode on page regions. The fixes are present in my GIT
repo I referred to earlier  (and also include all trunk commits up to this
point). To be a little more detailed:

   - the use of writing-mode="rl" on simple-page-master now results in
   correct interpretation of region-start and region end; i.e.,
region-start is
   now on the right side of the page (with 0 reference orientation), and
   region-end is on the left side;
   - the erroneous (historical) mirroring around the y axis of viewports
   with writing-mode="rl", including those generated by region-* and
   block-container, has been removed;
   - both text-align and text-align-last now treat start and end as
relative
   to the writing mode, e.g., text-align="start" is on the right when
   writing-mode="rl", etc.
   - if no text-align is specified, then in a writing-mode="rl" context
   correctly results in right (i.e., start) alignment, while in "lr" start
is
   on left (assuming reference orientation of 0);

I am aware of an existing problem with text-align="justify" in RTL WM
contexts, and expect a fix in a day or so.

Let me know if you encounter any other bidi problems. Also, just as a
reminder, a neutral character, e.g., FULL STOP '.', at the end of a
paragraph in a block takes on the default direction of the block. So, if
you
have a block of English text with a period at the end and it appears in a
RTL WM context, then the period will be placed at the left of the last
line,
not the right as one might expect. This is actually correct behavior, and
is
a side effect of the Unicode bidi algorithm. To deal with this, you can
wrap
the English text including the period with<fo:bidi-override
unicode-bidi="embed" direction="ltr">Sentence(s) with a period at the
end.</fo:bidi-override>. This will create a LTR embedding context in the
outer RTL context of the block.

In general, you can use the fo:bidi-override element to both create bidi
embedding levels and also to override the directionality of text as would
be
computed by the Unicode bidi algorithm.

G.

On Wed, Mar 9, 2011 at 2:28 PM, Glenn Adams<gl...@skynav.com>  wrote:



I have a fix for the block-container issue as well, which I will commit
shortly to my GIT repo. The problem was that earlier (pre complex script)
code apparently assumed that right-to-left writing mode was handled by
mirroring the CTM around the y axis, so it was setting the CTM
incorrectly
for the viewport area generated by block-container. In fact there is no
relationship between WM and reference orientation (and thus CTM on
viewport
area).

I'll let you know when I've made the commit.

G.


On Wed, Mar 9, 2011 at 2:10 PM, Matthias Reischenbacher<
matthias8283@gmx.at>  wrote:




Ok, thanks a lot for your help!
Matthias


Glenn Adams-2 wrote:


It appears the problem is due to a bug related to the use of
block-container, which I will look into. However, if you remove
block-container, and put the writing-mode and (default) font-family on
fo:page-sequence, it should produce correct results. See attached for

what

I'm getting (using the current GITHUB repo) with a modified FO.

I would advise you use the GIT repository for now, because it is kept

up

to
date with my working copy. I submit a patch irregularly for

integration

into
the SVN Temp_ComplexScripts branch.

G.

On Wed, Mar 9, 2011 at 12:21 PM, Matthias Reischenbacher<
matthias8283@gmx.at>  wrote:




Glenn,

here it goes:
Fo file:  http://old.nabble.com/file/p31109566/hebrew_test.xml
hebrew_test.xml
PDF file:  http://old.nabble.com/file/p31109566/hebrew_test.pdf <http://old.nabble.com/file/p31109566/hebrew_test..pdf> 
hebrew_test.pdf

Should I try building your code on git hub? I've never used git

therefore

I
first went with the apache SVN branch.

Thanks&  Regards,
Matthias


Glenn Adams-2 wrote:


Matthias,

Thanks for the report. Could you send me the FO input file and PDF

output

file? I am actively testing and fixing the Bidi and Script support,

with

real-time updates occurring at git://github.com/skynavga/fop.git.

Regards,
Glenn

On Wed, Mar 9, 2011 at 11:28 AM, Matthias Reischenbacher<
matthias8283@gmx..at <ma...@gmx.at> >  wrote:


Glenn,

I tried your work today of the complex script branch. I managed to
generate
a PDF file with Hebrew text using Arial Unicode MS font and

writing-mode

set
to rl-tb. The Hebrew text is displayed fine but english characters

are

also
mirrored. Do I have to set an additional xsl-fo attribute in order

to

correctly display english characters or is the BIDI text algorithm

not

yet
implemented?

Thanks for your help,
Matthias Reischenbacher
--
View this message in context:

 

http://old.nabble.com/Complex-Script%2C-BIDI-text-supported--tp31109094p31109094.html

Sent from the FOP - Users mailing list archive at Nabble.com.



---------------------------------------------------------------------

To unsubscribe, e-mail:

fop-users-unsubscribe@xmlgraphics.apache.org

For additional commands, e-mail:

fop-users-help@xmlgraphics.apache.org

 

 


--
View this message in context:

http://old.nabble.com/Complex-Script%2C-BIDI-text-supported--tp31109094p31109566.html

Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org <ma...@xmlgraphics..apache.org> 
For additional commands, e-mail:

fop-users-help@xmlgraphics.apache.org

 


<?xml version="1.0" encoding="UTF-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
  <fo:layout-master-set>
    <fo:simple-page-master master-name="simple" page-height="5in"
page-width="5in">
      <fo:region-body/>
    </fo:simple-page-master>
  </fo:layout-master-set>
  <fo:page-sequence master-reference="simple" writing-mode="rl-tb"
font-family="Arial Unicode MS">
    <fo:flow flow-name="xsl-region-body">
      <fo:block>חוברת הוראות בטיחות זו מתמקדת בכמה מהמצבים העקרוניים
שעשויים להתרחש בעת הפעלת המכונה ותחזוקתה.</fo:block>
      <fo:block>Test</fo:block>
    </fo:flow>
  </fo:page-sequence>
</fo:root>



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


--
View this message in context:
http://old.nabble.com/Complex-Script%2C-BIDI-text-supported--tp31109094p31110436.html
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org

 

 

 



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org

 

 

  _____  

No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1325 / Virus Database: 1500/3634 - Release Date: 05/12/11

 

 

  _____  

  _____  

No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1325 / Virus Database: 1500/3634 - Release Date: 05/12/11


Re: Complex Script, BIDI text supported?

Posted by Glenn Adams <gl...@skynav.com>.
Theresa,

The current code in git://github.com/skynavga/fop.git DOES handle
right-to-left column progression in fo:table. You need to ensure that the
appropriate writing mode is specified on fo:table or on the nearest ancestor
fo:block-container or on fo:page-sequence.

I have NOT yet implemented changes needed to reverse page numbering, but it
is on my list of TODO items. Thanks for reminding me.

Regards,
Glenn

On Fri, May 13, 2011 at 7:26 AM, Theresa Jayne Forster <
theresa@inbrand.co.uk> wrote:

> Once I have the normal one set up I will be looking at the bidi (we need it
> for Arabic) the one sticking point for us is we need the page numbering
> reversed on the <fo:page-number/> and also for a multi column document we
> need it to go Right to left, does the git version have this? Or is that
> still in development?
>
>
>
> Theresa Forster
>
> *From:* Matthias Reischenbacher [mailto:matthias8283@gmx.at]
> *Sent:* 13 May 2011 12:58
> *To:* fop-users@xmlgraphics.apache.org
> *Subject:* Re: Complex Script, BIDI text supported?
>
>
>
> Hi Glenn,
>
> I've tested your git branch and the following additional issues came up:
>
> 1. fo:basic-links with internal destination don't work
> 2. fo:page-number references only sometimes work
> 3. start-indent on fo:block with a block-container child isn't taken into
> account.
>
> Please let me know, if you want me to prepare a test case showing all three
> issues.
>
> Best regards,
> Matthias
>
> On 31.03.2011 00:43, Glenn Adams wrote:
>
> Matthias,
>
>
>
> I just updated my working repo git://github.com/skynavga/fop.git with
> fixes for fo:table and fo:list-block to account for RTL writing modes; i.e.,
> table column progression and list-item (label and body) alignment are now
> RTL in RTL WM contexts.
>
>
>
> In the process, I uncovered two other issues as well, which I am now
> working on along with the fo:character problem you reported:
>
>    - fo:block-container does not align right in a RTL WM context when it
>    does not use absolute or fixed positioning;
>    - fo:leader is not working in a RTL WM context;
>
> I will update you when I have fixes committed for these issues.
>
>
>
> G.
>
>
>
> On Wed, Mar 23, 2011 at 6:45 AM, Glenn Adams <gl...@skynav.com> wrote:
>
> Thanks for uncovering these issues. Let me address them and I'll let you
> know when they are fixed in my GIT repo. Perhaps after that I can submit a
> new patch update for the SVN branch.
>
>
>
> G.
>
>
>
> 2011/3/23 Matthias Reischenbacher <ma...@gmx.at>
>
> Glenn,
>
> I just tested a little bit more and the following questions/problems came
> up:
>
> 1. Are table cells also supposed to flow from right to left in "rl-tb"
> writing-mode?
>
> 2. Shouldn't list-item labels be displayed on the right side?
>
> 3. fo:character seem to overlap in rl mode.
>
> I'm attaching a new test file and the current PDF output.
>
> Thanks,
> Matthias
>
>
>
> On 22.03.2011 18:27, Matthias Reischenbacher wrote:
>
>
> Hi Glenn,
>
> thanks again for your help and doing all those fixes. Today I've retested
> my
> sample file with the git branch and everything works fine now. I'll do some
> more testing in the next weeks and I'll let you know if I encounter any
> problems.
>
> Are you planning to submit a new patch for the apache svn repo anytime
> soon?
> If not, no problem. I'm just asking because I have some local modifications
> in my svn working copy which I'll have to apply manually to the git working
> copy.
>
> Thanks&  best regards,
> Matthias
>
>
> Glenn Adams-2 wrote:
>
>
> Matthias,
>
> I've fixed the fo:block-container problem as well as text-align and
> treatment of writing-mode on page regions. The fixes are present in my GIT
> repo I referred to earlier  (and also include all trunk commits up to this
> point). To be a little more detailed:
>
>    - the use of writing-mode="rl" on simple-page-master now results in
>    correct interpretation of region-start and region end; i.e.,
> region-start is
>    now on the right side of the page (with 0 reference orientation), and
>    region-end is on the left side;
>    - the erroneous (historical) mirroring around the y axis of viewports
>    with writing-mode="rl", including those generated by region-* and
>    block-container, has been removed;
>    - both text-align and text-align-last now treat start and end as
> relative
>    to the writing mode, e.g., text-align="start" is on the right when
>    writing-mode="rl", etc.
>    - if no text-align is specified, then in a writing-mode="rl" context
>    correctly results in right (i.e., start) alignment, while in "lr" start
> is
>    on left (assuming reference orientation of 0);
>
> I am aware of an existing problem with text-align="justify" in RTL WM
> contexts, and expect a fix in a day or so.
>
> Let me know if you encounter any other bidi problems. Also, just as a
> reminder, a neutral character, e.g., FULL STOP '.', at the end of a
> paragraph in a block takes on the default direction of the block. So, if
> you
> have a block of English text with a period at the end and it appears in a
> RTL WM context, then the period will be placed at the left of the last
> line,
> not the right as one might expect. This is actually correct behavior, and
> is
> a side effect of the Unicode bidi algorithm. To deal with this, you can
> wrap
> the English text including the period with<fo:bidi-override
> unicode-bidi="embed" direction="ltr">Sentence(s) with a period at the
> end.</fo:bidi-override>. This will create a LTR embedding context in the
> outer RTL context of the block.
>
> In general, you can use the fo:bidi-override element to both create bidi
> embedding levels and also to override the directionality of text as would
> be
> computed by the Unicode bidi algorithm.
>
> G.
>
> On Wed, Mar 9, 2011 at 2:28 PM, Glenn Adams<gl...@skynav.com>  wrote:
>
>
> I have a fix for the block-container issue as well, which I will commit
> shortly to my GIT repo. The problem was that earlier (pre complex script)
> code apparently assumed that right-to-left writing mode was handled by
> mirroring the CTM around the y axis, so it was setting the CTM
> incorrectly
> for the viewport area generated by block-container. In fact there is no
> relationship between WM and reference orientation (and thus CTM on
> viewport
> area).
>
> I'll let you know when I've made the commit.
>
> G.
>
>
> On Wed, Mar 9, 2011 at 2:10 PM, Matthias Reischenbacher<
> matthias8283@gmx.at>  wrote:
>
>
>
> Ok, thanks a lot for your help!
> Matthias
>
>
> Glenn Adams-2 wrote:
>
>
> It appears the problem is due to a bug related to the use of
> block-container, which I will look into. However, if you remove
> block-container, and put the writing-mode and (default) font-family on
> fo:page-sequence, it should produce correct results. See attached for
>
> what
>
> I'm getting (using the current GITHUB repo) with a modified FO.
>
> I would advise you use the GIT repository for now, because it is kept
>
> up
>
> to
> date with my working copy. I submit a patch irregularly for
>
> integration
>
> into
> the SVN Temp_ComplexScripts branch.
>
> G.
>
> On Wed, Mar 9, 2011 at 12:21 PM, Matthias Reischenbacher<
> matthias8283@gmx.at>  wrote:
>
>
>
> Glenn,
>
> here it goes:
> Fo file:  http://old.nabble.com/file/p31109566/hebrew_test.xml
> hebrew_test.xml
> PDF file:  http://old.nabble.com/file/p31109566/hebrew_test.pdf
> hebrew_test.pdf
>
> Should I try building your code on git hub? I've never used git
>
> therefore
>
> I
> first went with the apache SVN branch.
>
> Thanks&  Regards,
> Matthias
>
>
> Glenn Adams-2 wrote:
>
>
> Matthias,
>
> Thanks for the report. Could you send me the FO input file and PDF
>
> output
>
> file? I am actively testing and fixing the Bidi and Script support,
>
> with
>
> real-time updates occurring at git://github.com/skynavga/fop.git.
>
> Regards,
> Glenn
>
> On Wed, Mar 9, 2011 at 11:28 AM, Matthias Reischenbacher<
> matthias8283@gmx.at>  wrote:
>
>
> Glenn,
>
> I tried your work today of the complex script branch. I managed to
> generate
> a PDF file with Hebrew text using Arial Unicode MS font and
>
> writing-mode
>
> set
> to rl-tb. The Hebrew text is displayed fine but english characters
>
> are
>
>  also
> mirrored. Do I have to set an additional xsl-fo attribute in order
>
> to
>
>  correctly display english characters or is the BIDI text algorithm
>
> not
>
>  yet
> implemented?
>
> Thanks for your help,
> Matthias Reischenbacher
> --
> View this message in context:
>
>
>
>
> http://old.nabble.com/Complex-Script%2C-BIDI-text-supported--tp31109094p31109094.html
>
> Sent from the FOP - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
>
> To unsubscribe, e-mail:
>
> fop-users-unsubscribe@xmlgraphics.apache.org
>
> For additional commands, e-mail:
>
> fop-users-help@xmlgraphics.apache.org
>
>
>
>
>
>
> --
> View this message in context:
>
>
> http://old.nabble.com/Complex-Script%2C-BIDI-text-supported--tp31109094p31109566.html
>
> Sent from the FOP - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail:
>
> fop-users-help@xmlgraphics.apache.org
>
>
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
>   <fo:layout-master-set>
>     <fo:simple-page-master master-name="simple" page-height="5in"
> page-width="5in">
>       <fo:region-body/>
>     </fo:simple-page-master>
>   </fo:layout-master-set>
>   <fo:page-sequence master-reference="simple" writing-mode="rl-tb"
> font-family="Arial Unicode MS">
>     <fo:flow flow-name="xsl-region-body">
>       <fo:block>חוברת הוראות בטיחות זו מתמקדת בכמה מהמצבים העקרוניים
> שעשויים להתרחש בעת הפעלת המכונה ותחזוקתה.</fo:block>
>       <fo:block>Test</fo:block>
>     </fo:flow>
>   </fo:page-sequence>
> </fo:root>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>
> --
> View this message in context:
>
> http://old.nabble.com/Complex-Script%2C-BIDI-text-supported--tp31109094p31110436.html
> Sent from the FOP - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>
>
>
> ------------------------------
>
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 10.0.1325 / Virus Database: 1500/3634 - Release Date: 05/12/11
>

RE: Complex Script, BIDI text supported?

Posted by Theresa Jayne Forster <th...@inbrand.co.uk>.
Once I have the normal one set up I will be looking at the bidi (we need it for Arabic) the one sticking point for us is we need the page numbering reversed on the <fo:page-number/> and also for a multi column document we need it to go Right to left, does the git version have this? Or is that still in development?

 

Theresa Forster

From: Matthias Reischenbacher [mailto:matthias8283@gmx.at] 
Sent: 13 May 2011 12:58
To: fop-users@xmlgraphics.apache.org
Subject: Re: Complex Script, BIDI text supported?

 

Hi Glenn,

I've tested your git branch and the following additional issues came up:

1. fo:basic-links with internal destination don't work
2. fo:page-number references only sometimes work
3. start-indent on fo:block with a block-container child isn't taken into account.

Please let me know, if you want me to prepare a test case showing all three issues.

Best regards,
Matthias

On 31.03.2011 00:43, Glenn Adams wrote: 

Matthias,

 

I just updated my working repo git://github.com/skynavga/fop.git with fixes for fo:table and fo:list-block to account for RTL writing modes; i.e., table column progression and list-item (label and body) alignment are now RTL in RTL WM contexts. 

 

In the process, I uncovered two other issues as well, which I am now working on along with the fo:character problem you reported:

*	fo:block-container does not align right in a RTL WM context when it does not use absolute or fixed positioning;
*	fo:leader is not working in a RTL WM context;

I will update you when I have fixes committed for these issues.

 

G.

 

On Wed, Mar 23, 2011 at 6:45 AM, Glenn Adams <gl...@skynav.com> wrote:

Thanks for uncovering these issues. Let me address them and I'll let you know when they are fixed in my GIT repo. Perhaps after that I can submit a new patch update for the SVN branch. 

 

G. 

 

2011/3/23 Matthias Reischenbacher <ma...@gmx.at>



Glenn,

I just tested a little bit more and the following questions/problems came up:

1. Are table cells also supposed to flow from right to left in "rl-tb" writing-mode?

2. Shouldn't list-item labels be displayed on the right side?

3. fo:character seem to overlap in rl mode.

I'm attaching a new test file and the current PDF output.

Thanks,
Matthias 



On 22.03.2011 18:27, Matthias Reischenbacher wrote:


Hi Glenn,

thanks again for your help and doing all those fixes. Today I've retested my
sample file with the git branch and everything works fine now. I'll do some
more testing in the next weeks and I'll let you know if I encounter any
problems.

Are you planning to submit a new patch for the apache svn repo anytime soon?
If not, no problem. I'm just asking because I have some local modifications
in my svn working copy which I'll have to apply manually to the git working
copy.

Thanks&  best regards,
Matthias


Glenn Adams-2 wrote:


Matthias,

I've fixed the fo:block-container problem as well as text-align and
treatment of writing-mode on page regions. The fixes are present in my GIT
repo I referred to earlier  (and also include all trunk commits up to this
point). To be a little more detailed:

   - the use of writing-mode="rl" on simple-page-master now results in
   correct interpretation of region-start and region end; i.e.,
region-start is
   now on the right side of the page (with 0 reference orientation), and
   region-end is on the left side;
   - the erroneous (historical) mirroring around the y axis of viewports
   with writing-mode="rl", including those generated by region-* and
   block-container, has been removed;
   - both text-align and text-align-last now treat start and end as
relative
   to the writing mode, e.g., text-align="start" is on the right when
   writing-mode="rl", etc.
   - if no text-align is specified, then in a writing-mode="rl" context
   correctly results in right (i.e., start) alignment, while in "lr" start
is
   on left (assuming reference orientation of 0);

I am aware of an existing problem with text-align="justify" in RTL WM
contexts, and expect a fix in a day or so.

Let me know if you encounter any other bidi problems. Also, just as a
reminder, a neutral character, e.g., FULL STOP '.', at the end of a
paragraph in a block takes on the default direction of the block. So, if
you
have a block of English text with a period at the end and it appears in a
RTL WM context, then the period will be placed at the left of the last
line,
not the right as one might expect. This is actually correct behavior, and
is
a side effect of the Unicode bidi algorithm. To deal with this, you can
wrap
the English text including the period with<fo:bidi-override
unicode-bidi="embed" direction="ltr">Sentence(s) with a period at the
end.</fo:bidi-override>. This will create a LTR embedding context in the
outer RTL context of the block.

In general, you can use the fo:bidi-override element to both create bidi
embedding levels and also to override the directionality of text as would
be
computed by the Unicode bidi algorithm.

G.

On Wed, Mar 9, 2011 at 2:28 PM, Glenn Adams<gl...@skynav.com>  wrote:




I have a fix for the block-container issue as well, which I will commit
shortly to my GIT repo. The problem was that earlier (pre complex script)
code apparently assumed that right-to-left writing mode was handled by
mirroring the CTM around the y axis, so it was setting the CTM
incorrectly
for the viewport area generated by block-container. In fact there is no
relationship between WM and reference orientation (and thus CTM on
viewport
area).

I'll let you know when I've made the commit.

G.


On Wed, Mar 9, 2011 at 2:10 PM, Matthias Reischenbacher<
matthias8283@gmx.at>  wrote:





Ok, thanks a lot for your help!
Matthias


Glenn Adams-2 wrote:




It appears the problem is due to a bug related to the use of
block-container, which I will look into. However, if you remove
block-container, and put the writing-mode and (default) font-family on
fo:page-sequence, it should produce correct results. See attached for

what



I'm getting (using the current GITHUB repo) with a modified FO.

I would advise you use the GIT repository for now, because it is kept

up



to
date with my working copy. I submit a patch irregularly for

integration



into
the SVN Temp_ComplexScripts branch.

G.

On Wed, Mar 9, 2011 at 12:21 PM, Matthias Reischenbacher<
matthias8283@gmx.at>  wrote:





Glenn,

here it goes:
Fo file:  http://old.nabble.com/file/p31109566/hebrew_test.xml
hebrew_test.xml
PDF file:  http://old.nabble.com/file/p31109566/hebrew_test.pdf
hebrew_test.pdf

Should I try building your code on git hub? I've never used git

therefore



I
first went with the apache SVN branch.

Thanks&  Regards,
Matthias


Glenn Adams-2 wrote:


Matthias,

Thanks for the report. Could you send me the FO input file and PDF

output

file? I am actively testing and fixing the Bidi and Script support,

with

real-time updates occurring at git://github.com/skynavga/fop.git.

Regards,
Glenn

On Wed, Mar 9, 2011 at 11:28 AM, Matthias Reischenbacher<
matthias8283@gmx.at>  wrote:


Glenn,

I tried your work today of the complex script branch. I managed to
generate
a PDF file with Hebrew text using Arial Unicode MS font and

writing-mode

set
to rl-tb. The Hebrew text is displayed fine but english characters

are



also
mirrored. Do I have to set an additional xsl-fo attribute in order

to



correctly display english characters or is the BIDI text algorithm

not



yet
implemented?

Thanks for your help,
Matthias Reischenbacher
--
View this message in context:

 

http://old.nabble.com/Complex-Script%2C-BIDI-text-supported--tp31109094p31109094.html



Sent from the FOP - Users mailing list archive at Nabble.com.




---------------------------------------------------------------------



To unsubscribe, e-mail:

fop-users-unsubscribe@xmlgraphics.apache.org



For additional commands, e-mail:

fop-users-help@xmlgraphics.apache.org



 

 


--
View this message in context:

http://old.nabble.com/Complex-Script%2C-BIDI-text-supported--tp31109094p31109566.html



Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail:

fop-users-help@xmlgraphics.apache.org



 


<?xml version="1.0" encoding="UTF-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
  <fo:layout-master-set>
    <fo:simple-page-master master-name="simple" page-height="5in"
page-width="5in">
      <fo:region-body/>
    </fo:simple-page-master>
  </fo:layout-master-set>
  <fo:page-sequence master-reference="simple" writing-mode="rl-tb"
font-family="Arial Unicode MS">
    <fo:flow flow-name="xsl-region-body">
      <fo:block>חוברת הוראות בטיחות זו מתמקדת בכמה מהמצבים העקרוניים
שעשויים להתרחש בעת הפעלת המכונה ותחזוקתה.</fo:block>
      <fo:block>Test</fo:block>
    </fo:flow>
  </fo:page-sequence>
</fo:root>



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


--
View this message in context:
http://old.nabble.com/Complex-Script%2C-BIDI-text-supported--tp31109094p31110436.html
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org



 

 

 



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org

 

 

  _____  

No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1325 / Virus Database: 1500/3634 - Release Date: 05/12/11