I know that this answer is coming late, but I had similar problem that I
needed to solve in my graph editor app. I wanted to draw boxes around SVG
text. I used ports to obtain the bounding box. Here's the gist of my
solution as github repo  and I also posted this in ellie  in case
anyone finds this useful.
I'd welcome suggestions for improvement if anyone solved similar problem in
some more elegant way.
On Tuesday, November 24, 2015 at 11:31:02 PM UTC+1, Ben Burdette wrote:
> I'm using svg to draw some text, and I'd like it to be as large as
> possible, but still fit inside a box. This stackoverflow illustrates the
> idea for a single line of text.
> The solution there seems to be to query SVG to get a bounding box for the
> text, then use the result of that to estimate the appropriate font size and
> text location. This approach doesn't seem to be appropriate for elm though,
> its not declarative. There doesn't seem to be a getBBox() function in the
> svg lib either.
> Any ideas on this? Right now going to just go with guessing from the
> string length.
You received this message because you are subscribed to the Google Groups "Elm
To unsubscribe from this group and stop receiving emails from it, send an email
For more options, visit https://groups.google.com/d/optout.