I have a circle in a svg which is this
<circle style="fill:none;" cx="203.00464" cy="289.69531" r="91.29858"/>
I want to add some text inside this circle to the top left most point of the circle to the bottom most right point inside the circle. I am able to add the text just fine however I'm struggling with the maths of how to get the text to fit perfectly inside the circle. All I know is what is above inside the <circle>
but these can vary from one svg to another.
I am able to display the text because I have a <div>
element that displays inside of a foreignObject. This displays fine its just the position and sizing I'm finding hard because currently everything is manual which is not ideal
How do I work this out I'm using javascript and jQuery to do all this as well as snap.svg to do animation.