W3C home > Mailing lists > Public > www-xsl-fo@w3.org > September 2012

Re: Spacing problem with mixed English and Arabic

From: G. Ken Holman <gkholman@CraneSoftwrights.com>
Date: Mon, 17 Sep 2012 16:26:38 -0400
Message-Id: <7.0.1.0.2.20120917162233.0236bfe0@wheresmymailserver.com>
To: <www-xsl-fo@w3.org>
At 2012-09-17 14:02 -0500, Ryan Fong wrote:
>G'day, mates.  I'm using Apache FOP 1.1rc1 on Java 1.7.0_07 64-bit and
>have a spacing problem.
>
>I have a block that says "Page x of x".  The text has been translated to
>Arabic and the numeric values are replaced with the fo calculated values
><fo:page-number/> and <fo:page-number-citation ref-id="last-page"/>.
>Writing mode has been set right-to-left.
>
>The problem is that the rendered page shows the numbers overlapping the
>text.  It is as if the spaces are ignored when the numbers are placed
>within the text.  I've tried using the word-spacing attribute on
>fo:block but the spaces are rendered unevenly, most of the space occurs
>to the left of the number.
>
>I've also noticed that any attempt to place a border around the number
>itself, such as using fo:inline with a colored border around the
>fo:page-number, results in a very thin line being displayed to the left
>of the number.  This indicates something wrong with the way it's
>calculated.
>
>I'd appreciate any workarounds for this problem or assistance
>identifying this as a bug in the rendering engine.  Thank you!

I'd call it a bug in the rendering engine.  There is certainly 
nothing I know of in the specification that would allow the overwrite.

Have you tried just a simple XSL-FO instance that illustrates the 
problem?  If you post it to the list, then I and other can try out 
the fragment in other rendering engines.

A starting fragment is below ... simply replace the text and add the 
properties as needed, then run it in FOP to prove to yourself there 
is a problem, then post it to the list for others to try.

I hope this helps.

. . . . . . . . . . . .  Ken

<?xml version="1.0"?><!--mixdir.fo-->
<root xmlns="http://www.w3.org/1999/XSL/Format"
       font-family="Times" font-size="20pt">

   <layout-master-set>
     <simple-page-master master-name="frame"
                         page-height="297mm" page-width="210mm"
                         margin-top="15mm" margin-bottom="15mm"
                         margin-left="15mm" margin-right="15mm">
       <region-body region-name="frame-body"/>
     </simple-page-master>
   </layout-master-set>

   <page-sequence master-reference="frame">
     <flow flow-name="frame-body">
       <block>Test of mixing directions:</block>
       <block>Page 123 of 456</block>
     </flow>
   </page-sequence>
</root>


--
Public XSLT, XSL-FO, UBL and code list classes in Europe -- Oct 2012
Contact us for world-wide XML consulting and instructor-led training
Free 5-hour lecture: http://www.CraneSoftwrights.com/links/udemy.htm
Crane Softwrights Ltd.            http://www.CraneSoftwrights.com/f/
G. Ken Holman                   mailto:gkholman@CraneSoftwrights.com
Google+ profile: https://plus.google.com/116832879756988317389/about
Legal business disclaimers:    http://www.CraneSoftwrights.com/legal
Received on Monday, 17 September 2012 20:27:21 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 17 September 2012 20:27:22 GMT