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 Jim Quest <qu...@gmail.com> on 2012/07/18 12:23:36 UTC

writing-mode="rl", bidi-override etc

hi,

in left-to-right languages, we display 1 / 2 (i.e. page 1 of 2 pages).
in right-to-left languages, it should also do 1 / 2, and it does if
<fo:inline>1 / 2 </fo:inline>

however, if it is <fo:inline><fo:page-number/> / <fo:page-number-citation
ref-id="endofdoc"/></fo:inline>,

it displays (in right-to-left languages), 2 / 1 instead of 1 / 2

i have tried forcing it, using <fo:bidi-override direction="ltr"> to no
avail

it is the expected behaviour?

james

Re: writing-mode="rl", bidi-override etc

Posted by Glenn Adams <gl...@skynav.com>.
if you have already filed a bug, then please provide the link for the bug
entry; if you haven't, then please file a bug

fyi, no technical changes were made (to FOP) between FOP1.1RC1 and FOP1.1;
we normally only make a change to a release candidate if there is a
showstopper bug, and the bug you report does not qualify;

regards, glenn



On Mon, Nov 12, 2012 at 7:07 AM, James Quest <qu...@gmail.com> wrote:

> hi there,
>
> i have reported this issue in fop1.1rc1
>
> it seems this issue is still there in fop1.1 unfortunately
>
> any advice?
>
>
>
>
>
> --
> View this message in context:
> http://apache-fop.1065347.n5.nabble.com/writing-mode-rl-bidi-override-etc-tp36377p37337.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
>
>

Re: writing-mode="rl", bidi-override etc

Posted by James Quest <qu...@gmail.com>.
hi there,

i have reported this issue in fop1.1rc1

it seems this issue is still there in fop1.1 unfortunately

any advice?





--
View this message in context: http://apache-fop.1065347.n5.nabble.com/writing-mode-rl-bidi-override-etc-tp36377p37337.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


Re: writing-mode="rl", bidi-override etc

Posted by Glenn Adams <gl...@skynav.com>.
ok thanks, i will investigate further...

On Thu, Jul 19, 2012 at 6:16 AM, James Quest <qu...@gmail.com> wrote:

> hello,
>
> it does not seem to behave properly
>
> please see full fo below.
>
> as summary,
>
> <fo:block>1/2</fo:block>
> renders as 1/2 for rl, 1/2 for lr
>
> <fo:page-number/>/<fo:page-number-citation ref-id="endofdoc"/>
> renders as 2/1 for rl, 1/2 for lr
>
> <fo:bidi-override direction="ltr">
>   <fo:page-number/>/<fo:page-number-citation ref-id="endofdoc"/>
> </fo:bidi-override>
> renders as 2/1 for rl, 1/2 for lr
>
> <fo:bidi-override direction="ltr" unicode-bidi="embed">
>   <fo:page-number/>/<fo:page-number-citation ref-id="endofdoc"/>
> </fo:bidi-override>
> renders as /21 for rl, 1/2 for lr
>
> <fo:bidi-override direction="ltr" unicode-bidi="bidi-override">
>   <fo:page-number/>/<fo:page-number-citation ref-id="endofdoc"/>
> </fo:bidi-override>
> renders as /21 for rl, 1/2 for lr
>
> ------
>
> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="Arial"
> writing-mode="rl">
>   <fo:layout-master-set>
>     <fo:simple-page-master page-height="297mm" page-width="210mm"
> master-name="a4">
>       <fo:region-body margin-top="11mm" margin-bottom="12mm"
> margin-right="10mm" margin-left="10mm"/>
>     </fo:simple-page-master>
>   </fo:layout-master-set>
>   <fo:page-sequence master-reference="a4">
>     <fo:flow flow-name="xsl-region-body">
>       <fo:block>
>         <fo:block>1/2</fo:block>
>         <fo:block>
>           <fo:page-number/>/<fo:page-number-citation ref-id="endofdoc"/>
>         </fo:block>
>         <fo:block>
>           <fo:bidi-override direction="ltr">
>             <fo:page-number/>/<fo:page-number-citation ref-id="endofdoc"/>
>           </fo:bidi-override>
>         </fo:block>
>         <fo:block>
>           <fo:bidi-override direction="ltr" unicode-bidi="embed">
>             <fo:page-number/>/<fo:page-number-citation ref-id="endofdoc"/>
>           </fo:bidi-override>
>         </fo:block>
>         <fo:block>
>           <fo:bidi-override direction="ltr" unicode-bidi="bidi-override">
>             <fo:page-number/>/<fo:page-number-citation ref-id="endofdoc"/>
>           </fo:bidi-override>
>         </fo:block>
>
>       </fo:block>
>       <fo:block break-before="page">
>         <fo:block id="endofdoc"/>
>       </fo:block>
>     </fo:flow>
>   </fo:page-sequence>
> </fo:root>
>
>
> --
> View this message in context:
> http://apache-fop.1065347.n5.nabble.com/writing-mode-rl-bidi-override-etc-tp36377p36407.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
>
>

Re: writing-mode="rl", bidi-override etc

Posted by James Quest <qu...@gmail.com>.
hello,

it does not seem to behave properly

please see full fo below. 

as summary, 

<fo:block>1/2</fo:block> 
renders as 1/2 for rl, 1/2 for lr

<fo:page-number/>/<fo:page-number-citation ref-id="endofdoc"/>
renders as 2/1 for rl, 1/2 for lr

<fo:bidi-override direction="ltr">
  <fo:page-number/>/<fo:page-number-citation ref-id="endofdoc"/>
</fo:bidi-override>
renders as 2/1 for rl, 1/2 for lr

<fo:bidi-override direction="ltr" unicode-bidi="embed">
  <fo:page-number/>/<fo:page-number-citation ref-id="endofdoc"/>
</fo:bidi-override>
renders as /21 for rl, 1/2 for lr

<fo:bidi-override direction="ltr" unicode-bidi="bidi-override">
  <fo:page-number/>/<fo:page-number-citation ref-id="endofdoc"/>
</fo:bidi-override>
renders as /21 for rl, 1/2 for lr

------

<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="Arial"
writing-mode="rl">
  <fo:layout-master-set>
    <fo:simple-page-master page-height="297mm" page-width="210mm"
master-name="a4">
      <fo:region-body margin-top="11mm" margin-bottom="12mm"
margin-right="10mm" margin-left="10mm"/>
    </fo:simple-page-master>
  </fo:layout-master-set>
  <fo:page-sequence master-reference="a4">
    <fo:flow flow-name="xsl-region-body">
      <fo:block>
	<fo:block>1/2</fo:block>
	<fo:block>
	  <fo:page-number/>/<fo:page-number-citation ref-id="endofdoc"/>
	</fo:block>
	<fo:block>
	  <fo:bidi-override direction="ltr">
	    <fo:page-number/>/<fo:page-number-citation ref-id="endofdoc"/>
	  </fo:bidi-override>
	</fo:block>
	<fo:block>
	  <fo:bidi-override direction="ltr" unicode-bidi="embed">
	    <fo:page-number/>/<fo:page-number-citation ref-id="endofdoc"/>
	  </fo:bidi-override>
	</fo:block>
	<fo:block>
	  <fo:bidi-override direction="ltr" unicode-bidi="bidi-override">
	    <fo:page-number/>/<fo:page-number-citation ref-id="endofdoc"/>
	  </fo:bidi-override>
	</fo:block>

      </fo:block>
      <fo:block break-before="page">
	<fo:block id="endofdoc"/>
      </fo:block>
    </fo:flow>
  </fo:page-sequence>
</fo:root>


--
View this message in context: http://apache-fop.1065347.n5.nabble.com/writing-mode-rl-bidi-override-etc-tp36377p36407.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


Re: writing-mode="rl", bidi-override etc

Posted by Glenn Adams <gl...@skynav.com>.
On Wed, Jul 18, 2012 at 7:07 AM, Robert Meyer <rm...@hotmail.co.uk> wrote:

>  Hi James,
>
> From reading the XSL specification (http://www.w3.org/TR/xsl/#direction),
> it states:
>
> "For the 'direction' property to have any effect on inline-level elements,
> the 'unicode-bidi' property's value must be 'embed' or 'override'. "
>
> e.g. <fo:bidi-override direction="ltr" unicode-bidi="bidi-override">
>

I think what you want to do here is create a LTR embedding context, as
opposed to overriding the inherent directionality of the characters (which
is what the above does). So you should use:

<inline><fo:bidi-override direction="ltr"
unicode-bidi="embed"><fo:page-number/>
/ <fo:page-number-citation ref-id="endofdoc"/></fo:bidi-override></inline>

You can also do the same thing using explicit Unicode BIDI control
characters LRE and PDF:

<inline>&#x202A;<fo:page-number/> / <fo:page-number-citation
ref-id="endofdoc"/>&#x202C;</inline>

See [1] and [2] for more info.

[1]
http://xmlgraphics.apache.org/fop/1.1rc1/complexscripts.html#bidi_override_element
[2]
http://xmlgraphics.apache.org/fop/1.1rc1/complexscripts.html#bidi_controls

If you try that and are still having the same behaviour, would it be
> possible for you to reply with an example FO showing the problem.
>
> Regards,
>
> Robert Meyer
>
> ------------------------------
> Date: Wed, 18 Jul 2012 11:23:36 +0100
> Subject: writing-mode="rl", bidi-override etc
> From: quest.james@gmail.com
> To: fop-users@xmlgraphics.apache.org
>
>
> hi,
>
> in left-to-right languages, we display 1 / 2 (i.e. page 1 of 2 pages).
> in right-to-left languages, it should also do 1 / 2, and it does if
> <fo:inline>1 / 2 </fo:inline>
>
> however, if it is <fo:inline><fo:page-number/> / <fo:page-number-citation
> ref-id="endofdoc"/></fo:inline>,
>
> it displays (in right-to-left languages), 2 / 1 instead of 1 / 2
>
> i have tried forcing it, using <fo:bidi-override direction="ltr"> to no
> avail
>
> it is the expected behaviour?
>
> james
>

RE: writing-mode="rl", bidi-override etc

Posted by Robert Meyer <rm...@hotmail.co.uk>.
Hi James,

>From reading the XSL specification (http://www.w3.org/TR/xsl/#direction), it states:

"For the 'direction' property to have any effect on inline-level
elements, the 'unicode-bidi' property's value must be 'embed' or
'override'. "

e.g. <fo:bidi-override direction="ltr" unicode-bidi="bidi-override">

If you try that and are still having the same behaviour, would it be possible for you to reply with an example FO showing the problem.

Regards,

Robert Meyer

Date: Wed, 18 Jul 2012 11:23:36 +0100
Subject: writing-mode="rl", bidi-override etc
From: quest.james@gmail.com
To: fop-users@xmlgraphics.apache.org

hi,

in left-to-right languages, we display 1 / 2 (i.e. page 1 of 2 pages).
in right-to-left languages, it should also do 1 / 2, and it does if <fo:inline>1 / 2 </fo:inline>

however, if it is <fo:inline><fo:page-number/> / <fo:page-number-citation ref-id="endofdoc"/></fo:inline>,



it displays (in right-to-left languages), 2 / 1 instead of 1 / 2

i have tried forcing it, using <fo:bidi-override direction="ltr"> to no avail

it is the expected behaviour?

james