Hello, Sure its not critical problem, but cosmetic that would be nice to fix.
In sample below selection of first string by double click will overlap second string. In Adobe viewer with non-trasparent selection it's look even worse :) <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.0//EN' 'http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd'> <svg xmlns:xlink="http://www.w3.org/1999/xlink" style="fill-opacity:1; color-rendering:auto; color-interpolation:auto; text-rendering:auto; stroke:black; stroke-linecap:square; stroke-miterlimit:10; shape-rendering:auto; stroke-opacity:1; fill:black; stroke-dasharray:none; font-weight:normal; stroke-width:1; font-family:'sansserif'; font-style:normal; stroke-linejoin:miter; font-size:12; stroke-dashoffset:0; image-rendering:auto;" xmlns="http://www.w3.org/2000/svg"> <!--Generated by the Batik Graphics2D SVG Generator--> <defs id="genericDefs" /> <g> <g style="font-size:1; font-family:'Arial';"> <text x="0" y="20" style="font-size:15; stroke:none;" xml:space="preserve">Hello, size 15 </text> <text x="100" y="20" style="font-size:10; stroke:none;" xml:space="preserve">Hello, size 10 </text> </g> </g> </svg> Thank you, Vladislav -----Original Message----- From: Vincent Hardy [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 20, 2002 11:22 PM To: [EMAIL PROTECTED] Subject: Re: additional spaces in text - bug or feature Vladislav, This is happening because the piece of code which writes out the XML makes a tabbified output which does not play well with xml:space="preserve". In effect, it erroneously adds trailing spaces. I could argue this is not a bug as the goal is to have accurate visual rendering and we do have accurate rendering. However, I think we should fix it anyway. How important is this to you? Is that a critical problem? Note that we are using xml:space preserve in case the string you draw has leading or trailing spaces which we want to preserve or multiple spaces inside the string. Cheers, Vincent. Vladislav Protasov wrote: > > Hello, > > Thank you for quick response. > > In the same sample before closing </text> tag 6 spaces added to make closing tag >under opening tag, but it really adds this 6 spaces to "Hello Java 2D to SVG" and >makes "Hello Java 2D to SVG " > and it possible to select this spaces in SVG viewer. > Is it bug or feature? > --------------- > > <?xml version="1.0" encoding="UTF-8"?> > > <!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.0//EN' >'http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd'> > <svg xmlns:xlink="http://www.w3.org/1999/xlink" style="fill-opacity:1; >color-rendering:auto; color-interpolation:auto; text-rendering:auto; stroke:black; >stroke-linecap:square; stroke-miterlimit:10; shape-rendering:auto; stroke-opacity:1; >fill:black; stroke-dasharray:none; font-weight:normal; stroke-width:1; >font-family:'sansserif'; font-style:normal; stroke-linejoin:miter; >font-size:12; stroke-dashoffset:0; image-rendering:auto;" >xmlns="http://www.w3.org/2000/svg"> > <!--Generated by the Batik Graphics2D SVG Generator--> > <defs id="genericDefs" /> > <g> > <g style="font-family:'Arial'; font-size:16;"> > <text xml:space="preserve" x="40" y="40" style="stroke:none;">Hello Java 2D to >SVG > </text> > </g> > </g> > </svg> > > Thank you, > Vladislav > > -----Original Message----- > From: Vincent Hardy [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, February 19, 2002 10:46 AM > To: [EMAIL PROTECTED] > Cc: Vladislav Protasov > Subject: Re: svggen - Float font size? > > Vladislav, > > Thanks for reporting this. You actually found what can be fairly > described as a bug. The generator uses the font.getSize() method > where it should be using the font.getSize2D() method. > > I am going to add a bug in Bugzilla and I'll try to fix it ASAP. > Cheers, > Vincent. > > > Hello, > > > > Is it possible to generate SVG with float font size? > > > > I modified method paint () of TestSVGGen example from >http://xml.apache.org/batik/svggen.html > > > > public void paint(Graphics2D g2d) { > > > > Font font=new Font("Arial", Font.PLAIN, 1); > > > > font=font.deriveFont(15.5f); > > > > g2d.setFont(font); > > > > g2d.drawString("Hello Java 2D to SVG", 40, 40); > > > > } > > > > It produces such output: > > > > <?xml version="1.0" encoding="UTF-8"?> > > > > <!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.0//EN' >'http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd'> > > > > <svg xmlns:xlink="http://www.w3.org/1999/xlink" style="fill-opacity:1; >color-rendering:auto; color-interpolation:auto; text-rendering:auto; stroke:black; >stroke-linecap:square; stroke-miterlimit:10; > > shape-rendering:auto; stroke-opacity:1; fill:black; stroke-dasharray:none; >font-weight:normal; stroke-width:1; font-family:'sansserif'; >font-style:normal; stroke-linejoin:miter; font-size:12; > > stroke-dashoffset:0; image-rendering:auto;" xmlns="http://www.w3.org/2000/svg"> > > > > <!--Generated by the Batik Graphics2D SVG Generator--> > > > > <defs id="genericDefs" /> > > > > <g> > > > > <g style="font-family:'Arial'; font-size:16;"> > > > > <text xml:space="preserve" x="40" y="40" style="stroke:none;">Hello Java 2D to SVG > > > > </text> > > > > </g> > > > > </g> > > > > </svg> > > > > > > > > > > Thank you, > > Vladislav > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]