Perhaps generate a closed path and apply a pattern fill or regular fill on that path. The closed path is effectively a triangle shape, to mimic a line of varied width.


Looking for an answer to this myself. It seems there is no easy way, but one possibility is to use the stroke-dasharray attribute.

Essentially, you can create a series of cloned paths, covering a range of stroke widths. If you turn them into dash arrays, you can play with the spacing between dashes to control which paths are visible at each point.

Depending on the shape and width you are looking for, you may also be able to fudge it by adding a second path element with a varying offset from the first.

Related Query