in reply to Re: SVG text width calculation
in thread SVG text width calculation
This is indeed the best solution, though one has to be aware that client support for text anchors isn't generally very good - last I tried inkscape didn't recognize it.
While SVG is a very nice format, and easy to generate, client side support is as unreliable as web programming in the days where you had to support IE 4 to 6 and all the "normal" browsers too. (I've ranted about this before).
Another possible approach (but clearly inferior to text-anchor) is to estimate the length of the rendered text (for example with help of Font::TTFMetrics), and then fixing the length to the calculated value with the textLength attribute. But then again this often results in ugly output, and the client support for textLength is equally bad.
|
|---|