You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by th...@kodak.com on 2006/08/23 15:34:38 UTC
Re : Issue when transcoding Arabic chars
Hi Thomas,
Thomas <tp...@yahoo.fr> wrote on 08/23/2006 09:23:39 AM:
> Following your advices we've moved the attributes from the <tspan> tag
to the
> <text> one:
> <text id="boxtext_ar_1" y="30" x="80" text-anchor="middle"
font-size="8pt"
> font-style="normal" font-family="Traditional Arabic" dy="27">
Merge the 'dy' with the 'y':
30+27 = 57 ->
<text id="boxtext_ar_1" y="57" x="80" text-anchor="middle"
font-size="8pt"
font-style="normal" font-family="Traditional Arabic">
> <tspan>[some arabic text]</tspan>
> </text>
> Unfortunately we still can see the same output as provided earlier in my
email.
>
> So we also removed the <tspan> tag:
> <text id="boxtext_ar_1" y="30" x="80" text-anchor="middle"
font-size="8pt"
> font-style="normal" font-family="Traditional Arabic" dy="27">[some
arabic text]</text>
> And we still get the same output.
>
> Our batik version is 1.6.
> Any clue?
>
> Thanks,
>
> T.
> ----- Message d'origine ----
> De : thomas.deweese@kodak.com
> À : batik-users@xmlgraphics.apache.org
> Cc : batik-users@xmlgraphics.apache.org
> Envoyé le : Mercredi, 23 Août 2006, 12h32mn 18s
> Objet : Re : Issue when transcoding Arabic chars
> Hi Thomas,
>
> Thomas <tp...@yahoo.fr> wrote on 08/22/2006 08:19:28 AM:
>
> > Please find attached a piece of SVG that contain some rect tags
> > and the text (svgbox.txt)[...] By the way I've got the exact
> > same rendering issue with Adobe SVG Plugin in IE, works very
> > well with Firefox.
>
> So the problem is the tspan. We don't handle the dy
> properly with the Right to Left rendering. If you move
> the tspan attributes to the text element it will work
> properly.
>
> <text id="boxtext_ar_1" y="30" x="80" text-anchor="middle"
> font-size="8pt" font-style="normal" font-family="Traditional
> Arabic">
> <tspan x="80" dy="27">[some arabic text]</tspan>
> </text>
>
> > ----- Message d'origine ----
> > De : thomas.deweese@kodak.com
> > À : batik-users@xmlgraphics.apache.org
> > Cc : batik-users@xmlgraphics.apache.org
> > Envoyé le : Mardi, 22 Août 2006, 12h35mn 02s
> > Objet : Re: Issue when transcoding Arabic chars
>
> > Hi Thomas,
> >
> > Thomas <tp...@yahoo.fr> wrote on 08/22/2006 06:08:10 AM:
> >
> > > We've built a simple servlet to transform SVG to JPG
> >
> > > It works very well with all kind of characters but for Arabic
> characters
> > it
> > > does not display correctly.
> > > The first character on the left is displayed well above the others.
> > >
> > > Is this a known issue?
> >
> > Can you provide an example?
> >
> > I am not aware of any known issues with Arabic text
> > handling. In fact I've heard that Batik's rendering of
> > Arabic is good. However, Arabic is an extremely difficult
> > script to layout well.
> >
> > This may also depend on the font used (Batik
> > implements Arabic glyph replacement so the first
> > and last glyphs in each word are replaced, it is
> > possible that the 'base' font doesn't include the
> > initial/final forms of the glyphs so Batik might
> > jump to another font which could account for the
> > problem).
> >
> > > Does a better algorithm exist?
> >
> > undoubtedly, but as I said, people have said that
> > Batik's rendering of Arabic is pretty good.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> > For additional commands, e-mail:
batik-users-help@xmlgraphics.apache.org
>
> > [attachment "svgbox.txt" deleted by Thomas E. DeWeese/449433/EKC]
> [attachment
> > "Output.jpg" deleted by Thomas E. DeWeese/449433/EKC]
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> > For additional commands, e-mail:
batik-users-help@xmlgraphics.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
Re : Re : Issue when transcoding Arabic chars
Posted by Thomas <tp...@yahoo.fr>.
Hi Thomas and all,
It now works perfectly. So the trick was to remove the dy attribute in <tspan> and replace it by y attribute.
Original SVG:
<text id="boxtext_ar_1" y="30" x="80" text-anchor="middle" font-size="8pt" font-style="normal" font-family="Traditional Arabic">
<tspan x="80" dy="27">[some arabic text 1]</tspan>
<tspan x="80" dy="27">[some arabic text 2]</tspan>
</text>
Working SVG:
<text id="boxtext_ar_1" y="30" x="80" text-anchor="middle" font-size="8pt" font-style="normal" font-family="Traditional Arabic">
<tspan x="80" y="57">[some arabic text 1]</tspan>
<tspan x="80" y="84">[some arabic text 2]</tspan>
</text>
Many thanks to Thomas for his help,
Best regards,
Thomas.
----- Message d'origine ----
De : thomas.deweese@kodak.com
À : batik-users@xmlgraphics.apache.org
Cc : batik-users@xmlgraphics.apache.org
Envoyé le : Mercredi, 23 Août 2006, 3h34mn 38s
Objet : Re : Issue when transcoding Arabic chars
Hi Thomas,
Thomas <tp...@yahoo.fr> wrote on 08/23/2006 09:23:39 AM:
> Following your advices we've moved the attributes from the <tspan> tag
to the
> <text> one:
> <text id="boxtext_ar_1" y="30" x="80" text-anchor="middle"
font-size="8pt"
> font-style="normal" font-family="Traditional Arabic" dy="27">
Merge the 'dy' with the 'y':
30+27 = 57 ->
<text id="boxtext_ar_1" y="57" x="80" text-anchor="middle"
font-size="8pt"
font-style="normal" font-family="Traditional Arabic">
> <tspan>[some arabic text]</tspan>
> </text>
> Unfortunately we still can see the same output as provided earlier in my
email.
>
> So we also removed the <tspan> tag:
> <text id="boxtext_ar_1" y="30" x="80" text-anchor="middle"
font-size="8pt"
> font-style="normal" font-family="Traditional Arabic" dy="27">[some
arabic text]</text>
> And we still get the same output.
>
> Our batik version is 1.6.
> Any clue?
>
> Thanks,
>
> T.
> ----- Message d'origine ----
> De : thomas.deweese@kodak.com
> À : batik-users@xmlgraphics.apache.org
> Cc : batik-users@xmlgraphics.apache.org
> Envoyé le : Mercredi, 23 Août 2006, 12h32mn 18s
> Objet : Re : Issue when transcoding Arabic chars
> Hi Thomas,
>
> Thomas <tp...@yahoo.fr> wrote on 08/22/2006 08:19:28 AM:
>
> > Please find attached a piece of SVG that contain some rect tags
> > and the text (svgbox.txt)[...] By the way I've got the exact
> > same rendering issue with Adobe SVG Plugin in IE, works very
> > well with Firefox.
>
> So the problem is the tspan. We don't handle the dy
> properly with the Right to Left rendering. If you move
> the tspan attributes to the text element it will work
> properly.
>
> <text id="boxtext_ar_1" y="30" x="80" text-anchor="middle"
> font-size="8pt" font-style="normal" font-family="Traditional
> Arabic">
> <tspan x="80" dy="27">[some arabic text]</tspan>
> </text>
>
> > ----- Message d'origine ----
> > De : thomas.deweese@kodak.com
> > À : batik-users@xmlgraphics.apache.org
> > Cc : batik-users@xmlgraphics.apache.org
> > Envoyé le : Mardi, 22 Août 2006, 12h35mn 02s
> > Objet : Re: Issue when transcoding Arabic chars
>
> > Hi Thomas,
> >
> > Thomas <tp...@yahoo.fr> wrote on 08/22/2006 06:08:10 AM:
> >
> > > We've built a simple servlet to transform SVG to JPG
> >
> > > It works very well with all kind of characters but for Arabic
> characters
> > it
> > > does not display correctly.
> > > The first character on the left is displayed well above the others.
> > >
> > > Is this a known issue?
> >
> > Can you provide an example?
> >
> > I am not aware of any known issues with Arabic text
> > handling. In fact I've heard that Batik's rendering of
> > Arabic is good. However, Arabic is an extremely difficult
> > script to layout well.
> >
> > This may also depend on the font used (Batik
> > implements Arabic glyph replacement so the first
> > and last glyphs in each word are replaced, it is
> > possible that the 'base' font doesn't include the
> > initial/final forms of the glyphs so Batik might
> > jump to another font which could account for the
> > problem).
> >
> > > Does a better algorithm exist?
> >
> > undoubtedly, but as I said, people have said that
> > Batik's rendering of Arabic is pretty good.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> > For additional commands, e-mail:
batik-users-help@xmlgraphics.apache.org
>
> > [attachment "svgbox.txt" deleted by Thomas E. DeWeese/449433/EKC]
> [attachment
> > "Output.jpg" deleted by Thomas E. DeWeese/449433/EKC]
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> > For additional commands, e-mail:
batik-users-help@xmlgraphics.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org