I'm working on a report that includes an embedded svg diagram. The diagram is drawn using relative coordinates, so when a browser window resizes the diagram resizes pretty well. The only exception there is text - it remains the same. Is it possible to draw text in svg that is resizable?
I think you have to use a relative size for the font-size. See http://www.w3.org/TR/SVG11/coords.html#UnitIdentifiers. When you use an absolute size like pt or cm, it is automatically calculated what the size must be to display correctly on your monitor, to get that size. But when you use px, the current viewport is used. If you don't specify a unit, the user units are also used as in the example on the linked document:
<text style="font-size: 50">Text size is 50 user units</text>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With