The stencil expression
path can be used to override stencils for any printed object. The advantage of using
path instead of
embedded-ps is that
path is supported by both the PostScript and SVG backends, and uses the same syntax.
There are six commands available to use in a
path expression, and all commands use prefix notation. The six commands are
moveto, rmoveto, lineto, rlineto, curveto, and
rcurveto. Note that the commands that begin with r are the relative variants of the other three commands.
moveto, rmoveto, lineto, and
rlineto take 2 arguments; they are the X and Y coordinates for the destination point.
rcurveto create cubic Bézier curves, and take 6 arguments; the first two are the X and Y coordinates for the first control point, the second two are the X and Y coordinates for the second control point, and the last two are the X and Y coordinates for the destination point.
In addition this snippet shows how to create a filled stencil using
path, and adds a scheme function to automatically resize custom stencils when individual staves are resized.