XML technologies / SVG / The coordinate system of SVG graphics / What is the coordinate system? / Units in the coordinate system

(Excerpt from “Das Einsteigerseminar SVG — Webgrafiken mit XML” by Helma Spona)

Sizes and lengths in SVG graphics require units. If none is specified, the number refers to viewport units. If one unit equals one pixel, values are interpreted in pixels. But if the user enlarges the graphic, specifying width="10" may display a width of 20 pixels instead of 10. This would be a twofold magnification.

You can also specify all sizes using units partly shared with stylesheets and HTML: em, ex, px, pt, pc, cm, mm, in and %. Put the unit immediately after the value, for example: width="20px" or width="20mm".

Note:
Never mix units. Consistently use absolute sizes in millimeters or pixels, no units, or percentages. Mixing units can produce unwanted results when zooming or printing.

   

 

 

 

back to top