Hi all, I'm trying to get a SVG 'text' element fitting inside of a svg 'rect' element. e.g. In the example below, I used a monospace text of 5 chars with a font-size of 100px and I expected to have a bounding rectangle close to the text.
But there is a blank gap at the right of the text.
<svg xmlns="http://www.w3.org/2000/svg" height="200" width="1000">
<text x="10px" y="110px" style="font-family:monospace;font-size:100px;">HELLO</text>
<rect x="10px" y="10px" width="500px" height="100px" style="stroke:blue;fill:none;"/>
</svg>
What CSS selectors should I use for the 'text' element ?
Note: I don't want to use the text-on-a-path method. Just a font with a fixed size.
Thanks;