docbook-apps

Fwd: [xep-support] FW: RTL direction attribute in SVG background image

  • 1.  Fwd: [xep-support] FW: RTL direction attribute in SVG background image

    Posted 12-08-2016 22:55



    -------- Forwarded Message --------
    Subject: [xep-support] FW: RTL direction attribute in SVG background image
    Date: Fri, 9 Dec 2016 09:49:29 +1100
    From: Darren Munt <darrenm@ardex.com.au>
    Reply-To: RenderX Community Support List <xep-support@renderx.com>
    To: xep-support@renderx.com <xep-support@renderx.com>



    May have sent this to the wrong support address….

    *From:*Darren Munt
    *Sent:* Thursday, 8 December 2016 5:31 PM
    *To:* 'support@renderx.com' <support@renderx.com>
    *Subject:* RTL direction attribute in SVG background image

    Trying to use an SVG background image to an fo:block. The SVG contains
    Arabic text, which is RTL. I have set the direction attribute on the SVG
    element to “RTL” but it does not appear to be honoured. The output text
    is back to front.

    The SVG looks like this:

    xmlns:svg="http://www.w3.org/2000/svg" direction="rtl">

    <text fill="#000000" x="8cm" y="1cm" font-size="1.5cm"
    font-family="Arabic Typesetting" text-anchor="middle">??????</text>



    I have it in a separate file at present and I’m importing it as follows:

    <fo:block keep-together.within-page="always" space-after="0.0cm"
    font-size="0.5cm" background-image="url('nonrunnerbanner-ar.svg')"
    border-bottom-width="0.02cm" border-bottom-color="#a59266"
    border-bottom-style="solid">



    </fo:block>

    In the English version of this document, I am using an embedded base64
    version of the SVG. I want to do the same here but I can’t get it
    writing right to left.

    Is there a way to get this text RTL, or do I need to resort to using an
    image instead?