Skip to content

Instantly share code, notes, and snippets.

View yuretz's full-sized avatar
🧐
pondering & elaborating

yuretz

🧐
pondering & elaborating
View GitHub Profile
@yuretz
yuretz / README.md
Last active August 29, 2015 14:27 — forked from tmcw/README.md
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.