Re: [svg-developers] Re: Omission in the SVG specification ?

2006-05-30 Thread thomas . deweese
Hi Johan, svg-developers@yahoogroups.com wrote on 05/29/2006 05:43:31 PM: > Without drastically reducing the functionality I need to be able to give the > end user of the library his/her choice of TTF fonts. At the moment the > library generates raster images encoded as either jpeg, gif or png

[svg-developers] Re: Omission in the SVG specification ?

2006-05-30 Thread Andreas Neumann
Hi, if you use a SVG toolkit like Batik you can use "onload" scripts and use the DOM to adjust the boxes according to the bounding boxes of the text. the batik-rasterizer can output jpeg, png, tiff and pdf. I use this succesfully for generating maps where I use a ECMAScript based label place

Re: [svg-developers] Re: Omission in the SVG specification ?

2006-05-29 Thread Johan Persson
Thanks for the tips. This is basically the workaround I have but unfortunately it's simply not good enough. The library I was contemplating an SVG backend for is JpGraph which is a PHP (an unholy mix of C/C++ and Java) server side graph generating library that I written. It has quite a lot of a

[svg-developers] Re: Omission in the SVG specification ?

2006-05-29 Thread Alastair Fettes
Hi Johan, First question for you is what library are you using to generate the SVG? Are you using a purpose built SVG library such as Batik or a generic XML library such as MSXML? If the former, then you will need to read the literature on Batik. If the latter then read on. I use statically ge

Re: [svg-developers] Re: Omission in the SVG specification ?

2006-05-28 Thread Ronan Oger
Pardon me for butting in, but have you tried to render serverside using Batik, gtk2, or librsvg? Admittedly, text bounding boxes are a thorny problem with serverside generation. My own Perl SVG library totally ignores the canvas and leaves it to the implementer to use their own canvas-model-pr

Re: [svg-developers] Re: Omission in the SVG specification ?

2006-05-28 Thread Johan Persson
Hi, Well, I do understand that not everyones taste can be catered for in a specification and I do realize that you can ask for the bbox in a DOM script (in the viewers that support this). But for basic entities like text, which I think most people can agree on is needed most of the time even in

Re: [svg-developers] Re: Omission in the SVG specification ?

2006-05-28 Thread Robin Berjon
On May 28, 2006, at 19:58, Johan Persson wrote: > I'm still so surprised about this omission since it basically > renders SVG > useless for anything involving graphics with TTF fonts and texts > (without > resorting to things like a fixed font where one could calculate an > approximate bounding

Re: [svg-developers] Re: Omission in the SVG specification ?

2006-05-28 Thread Johan Persson
Thanks for the replies. The example with the rectangle was just to illustrate my point. What I need is in general knowledge of the size of text strings in order to adjust all kinds of objects on the canvas and the general layout based on the actual text strings. The library I was planning to a

[svg-developers] Re: Omission in the SVG specification ?

2006-05-28 Thread Andreas Neumann
Hi, there is a probably ugly workaround: some elements accept "objectBoundingBox" as units. This includes pattern, clipPath, mask and filters. You could e.g. use a filter to add such a background rectangle to a text element. See example at: http://www.carto.net/neumann/temp/floodFilterExampl