Hi All, [EMAIL PROTECTED] wrote on 01/03/2007 04:51:26 PM:
> I've seen this before. It's because of the whitespace in between your > tags. Correct. > Try putting all your XML tags together and/or adding xml:space > attributes. The only other value for xml:space is preserve which would probably make his problem worse. > I'm not sure if Batik is actually supposed to ignore this extra > whitespace or not. I am fairly sure that Batik implements white space handling correctly. If you have example to the contrary I'd be interested in seeing them. > On 1/3/07, Joel Uckelman <[EMAIL PROTECTED]> wrote: > > I found what I think is a rendering bug in Batik 1.6: > > > > The following SVG Try adding: <line x1="50" y1="5" x2="50" y2="50" stroke="black" stroke-width="0.2"/> <line x1="100" y1="5" x2="100" y2="50" stroke="black" stroke-width="0.2"/> And zoom in a bit, then select the text. > > when rendered by Batik, gives me output like this: > > > > * * > > 8 1 > > 8 1 The rendering is I believe correct (or _very_ nearly so). The problem is caused by the spaces (select all the text to see what I mean). The last tspan doesn't have trailing spaces because of white space collapsing. The reason the 1 is shifted but the eight isn't shifted much is due to the way text-align="end" is handled, we alight the right edge of the glyph geometry with the specified x coordinate. The eight's geometry is almost as wide as glyphs advance so it moves only slightly relative to the upper 8, the 1 is much narrower than the glyphs advance. > > I don't see why this should be the case. Shouldn't the two 1s start > > at the same horizontal position? No, infact ;)