The d
attribute for an SVG's <path>
tag contains a series of instructions or descriptions, that are processed to create the SVG's overall shape. These instructions can be of different types:
- Moveto :: restart the path somewhere else (
M
or m
syntax)
- Lineto :: draw a straight line (
L
or l
syntax, or H
and V
, or h
and v
)
- Curveto :: draw a cubic Bezier curve (
C
or c
syntax)
- Arcto :: draw an elliptical curve (
A
or a
syntax)
- ClosePath :: draw a straight line to the opening point of the path (
Z
or z
syntax)
Uppercase letter syntax means that absolute position values are given. Lowercase syntax means that relative position values follow, meaning, that the subsequent coordinate is found down and to the right from the current control point.
The instructions provided in the d
attribute for your SVG, begin with an uppercase M
, which signifies absolute position values for a Moveto
command. But there are also lowercase c
commands present, which signify relative values for a Curveto
instruction set.
Regarding the first coordinates you are asking about...
Moveto
commands have two arguments. In the first segment of the first value you are inquiring about, 48.38 is the y
axis parameter (which follows the x
parameter of 65.32) for the Moveto
command. The remaining c5.65-0.95 is the beginning of a new Curveto
instruction set.
Curveto
commands have three arguments, made up of x
and y
pairs, each separated by a dash (-
). As it is given with a lowercase c
, the values that follow are relative. The first pair is the control point that begins the curve, the second is the control point that ends the curve, and the third is the coordinate that defines the current point from which the curve begins.
Regarding the second set of coordinates you are asking about...
The 18.92-3.42 is the current point (third argument) defined by the first Curveto
command, and the c2.05-0.45 is first argument of the next Curveto
command that controls the beginning of that bezier curve.
The dots, in these values, are decimal points.
If you take the d
attribute and break it apart, according to the number of arguments defined in documentation, per command, the instruction set becomes much more readable.
For more information on the d
attribute, see here and here.
For further information on bezier curves, see here.