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 mjlindeboom <ml...@aol.com> on 2007/01/04 21:17:43 UTC

Re: Hebrew

I have attached another example of some interesting behavior.

I have some lines with Latin/Hebrew text and a single line with just the
Hebrew text. The line containing just Hebrew text behaves in an
unpredictable manner placing text at the root location of a group instead of
at the correct relative text position. Only the first character is placed at
the correct position.

Is there a way to prevent this?

Mike






thomas.deweese wrote:
> 
> Hi Mike,
> 
> mlindeboom <mi...@bms.com> wrote on 12/20/2006 04:52:30 PM:
> 
>> 
>> I have attached an example. This is not exactly to problem I saw 
> originally
>> but it may be related. The hebrew text seems to arrange itself out of 
> the
>> desired sequence. I intended to have 2.5 appear after the hebrew text, 
> not
>> before. 
> 
>    The problem is bidi layout.  Numbers like '2.5' have no strong
> directionality, so the adopt the directionality of the preceding
> text in the absence of other clues.  So your '2.5' get's reordered
> with the preceding Hebrew.  You can force a strong directionality
> by adding:
>         unicode-bidi="embed" direction="ltr"
> 
>    To the tspan element.
> 
> 
>> thomas.deweese wrote:
>> > 
>> > Hi MJ,
>> > 
>> > mjlindeboom <ml...@aol.com> wrote on 11/27/2006 08:59:39 PM:
>> > 
>> >> I am mixing Hebrew and English text. The Hebrew letters seem to be 
>> > scattered
>> >> about. Is there anything I can do about this?
>> > 
>> >    Can you provide an example?  Batik generally does a pretty good
>> > job with BiDi text layout.  There was a bug that had to do with
>> > mixed layout an explicit positioning but it was fairly rare.
>> > 
>> >    Also I think I've fixed some minor stuff in BiDi since the 1.6
>> > release so you could try the latest SVN version of Batik.
>> > 
>> > 
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
>> > For additional commands, e-mail: 
> batik-users-help@xmlgraphics.apache.org
>> > 
>> > 
>> > 
>> http://www.nabble.com/file/5047/example.svg example.svg 
>> -- 
>> View this message in context: http://www.nabble.com/Hebrew-
>> tf2715739.html#a7998635
>> Sent from the Batik - Users mailing list archive at Nabble.com.
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
>> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
>> 
> 
> 
http://www.nabble.com/file/5294/example4.svg example4.svg 
-- 
View this message in context: http://www.nabble.com/Hebrew-tf2715739.html#a8166615
Sent from the Batik - Users mailing list archive at Nabble.com.


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


Re: Hebrew

Posted by th...@kodak.com.
Hi Mike,

mjlindeboom <ml...@aol.com> wrote on 01/05/2007 11:36:36 AM:

> Here is the sample that exibits this behavior

   So the problem is the use of 'dy'.  I have committed a
fix to SVN or you can replace your use of 'dy' with simple
use of 'y' (y1 = y + dy).  BTW the conversion from 
'em' to userspace units it just a multiply by the font-size.

Re: Hebrew

Posted by mjlindeboom <ml...@aol.com>.
Here is the sample that exibits this behavior

<svg width="100%" height="100%" version="1.1"
xmlns="http://www.w3.org/2000/svg">



	<g id='root_latin'>
		<text  x='50' y='150' id='test'>
			<tspan x='400' dy='0.0em'>Test 1 - The last entry is just the Hebrew
portion of the second entry</tspan>
		</text>
	</g>
	<g id='root_hebrew3'>
		<text x='50' y='150' dy='0.0em' id='test2' direction='ltr'
unicode-bidi='bidi-override'>
			<tspan>BMS-562247-01/Placebo</tspan>
			<tspan>,</tspan>
			<tspan direction='rtl' unicode-bidi='bidi-override'>טבליה מצופה</tspan>
			<tspan>,</tspan>
			<tspan>2.5 mg</tspan>
		</text>
		<text x='50' y='150' dy='1.5em' id='test2a' direction='ltr'
unicode-bidi='bidi-override'>
			<tspan>80</tspan>
			<tspan direction='rtl' unicode-bidi='bidi-override'>טבליות מצופות</tspan>
		</text>
		<text x='50' y='150' dy='3.0em' id='test2a' direction='ltr'
unicode-bidi='bidi-override'>
			<tspan>Enoxaparin Sodium/Placebo</tspan>
			<tspan>,</tspan>
			<tspan direction='rtl' unicode-bidi='bidi-override'>הזרקה
תת-עורית</tspan>
			<tspan>,</tspan>
			<tspan>40 mg</tspan>
		</text>
		<text x='50' y='150' dy='4.5em' id='test2a' direction='ltr'
unicode-bidi='bidi-override'>
			<tspan>40</tspan>
			<tspan direction='rtl' unicode-bidi='bidi-override'>מזרקים</tspan>
		</text>
		<text x='50' y='150' dy='6.0em' id='test2a' direction='ltr'
unicode-bidi='bidi-override'>
			<tspan direction='rtl' unicode-bidi='bidi-override'>טבליות מצופות</tspan>
		</text>
	</g>


</svg>

-- 
View this message in context: http://www.nabble.com/Hebrew-tf2715739.html#a8181214
Sent from the Batik - Users mailing list archive at Nabble.com.


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


Re: Hebrew

Posted by th...@kodak.com.
Hi Mike,

mjlindeboom <ml...@aol.com> wrote on 01/04/2007 03:17:43 PM:

> I have attached another example of some interesting behavior.

   Attachments are stripped by the DL (viruses, etc).  You can
open a bugzilla bug and attach the files there, or if small enough
simply put inline in the document.

> I have some lines with Latin/Hebrew text and a single line with just the
> Hebrew text. The line containing just Hebrew text behaves in an
> unpredictable manner placing text at the root location of a group 
instead of
> at the correct relative text position. Only the first character is 
placed at
> the correct position.
> 
> Is there a way to prevent this?

   I'd have to look at the content.