
I'm currently working on some Java code that will export Inkscape ready SVG from an open source mapping application. One of the things I need to do is export map labels. I've been taking a look at how Inkscape represents text labels in its SVG flavor. I'm looking for advice on how to calculate the dimensions of the rectangle element used as the flow region.
If I know the height of the font for the text labels in pixels, is there a formula that I can use to calculate the width and height I need for the flow region? Is this calculation dependent on the type of font? (I'm not really worried about getting the flow region a little too big. I'm more worried about getting it too small, and then not being able to see the label in Inkscape.)
Thanks for any suggestions.
Landon