All examples By author By category About

tmcw

One-way markers demo

SVG has line markers, but they have many failings. This example emulates markers-along-a-path by filling a textPath with the right number of glyphs.

The original version of this failed because Firefox does not support letter-spacing on SVG elements. The second version failed because it has a bug in getComputedTextLength. The third failed because it does not preserve space according to xml:space.

Hence this is not compatible with Firefox currently. It does work, imperfectly, in Opera & Chrome, though their kerning and interpretation of the getComputedTextLength API is much different than Chrome's.