SVG Text Scale - Width and Height

I would like to scale the text in svg. If I use font size, width and height are scaled. Is there a way to just scale the width or height? - All the examples that I found using the scale tag did not work or for the text that I think.

Thank you for your help, Hendrick.

+4
source share
3 answers

You can use the scale(x,y) transform command to scale an element. Scale 1 is the normal size, 0.5 is half the normal size, and 2 is the double normal size.

For example, add transform="scale(1, 2)" to your tag to scale it horizontally and twice vertically.

+5
source

Converting SVG to text attribute works great!

 <text transform="scale(1, 2)" fill="orange" font-family="Arial" font-size="70"> 

This snippet, for example, will increase your text by 2x along the y axis.

+2
source

Yes, what you can do is change your text to the path. The Inkscape menu has an β€œObject to Path” option, and of course you can scale as you wish. Some zoom options may leave text looking broken, so you need to experiment. For example, 50% width

-1
source

Source: https://habr.com/ru/post/1379678/


All Articles