7
votes

i would like to scale a text in svg. If i use the font size width and height are scaled. Is there any way for just scaling width or height? - All examples i found using the scale tag witch didn't work or for the text i think.

Thanks for your help, Hendrik

3

3 Answers

6
votes

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

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

4
votes

SVG transform on text attribute works excellent!

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

This snippet, for example, will increase your text by 2x at Y-axis.

-3
votes

Yes, what you could do is change your Text to Path. There's an option "Object to Path" in the Inkscape menu and them of course you can scale as you want. Certain scale options may leave the text looking battered so you have to experiment Eg 50% width height