Method 1
Set the height with what you want. Then set the width to something much larger than the proportional width. To stop the renderer by automatically reducing the height so that it matches the width.
<svg height="100px" width="1000px" ... >
However, by default this will cause the content to be centered to the right, so you will also need to set the appropriate preserveAspectRatio value.
<svg height="100px" width="1000px" preserveAspectRatio="xMinYMin" ... >
Method 2
Set both the height width and the desired height. Set preserveAspectRatio to one using slice and set the overflow parameter to visible .
<svg height="100px" width="100px" preserveAspectRatio="xMinYMin slice" overflow="visible" ... >
This approach may not be suitable for some situations. For example, if you embed HTML, a βwrongβ size may result in a poor layout. Although it should work in standalone situations.
source share