This is likely a very simple question, but how do I get text in SVG to stretch to fit its container?
I don\'t care if it looks ugly from being stretched too long or
Here is what I have come up with... Its similar to what other people have posted, but I think it resizes and scales nicely. This code will add spacing to any text roughly between 10-25 characters to make it fill the entire width of its parent. If you need longer or shorter text, just adjust the viewBox width and textLength attributes.