4 ms·
Something is odd about this example. The relative SVG path he gives as an example is missing two segments in the B. https://codepen.io/simonsarris/pen/ORwoLA?e
by simonsarris 8y ago
Something is odd about this example. The relative SVG path he gives as an example is missing two segments in the B.
https://codepen.io/simonsarris/pen/ORwoLA?editors=1010 https://codepen.io/simonsarris/pen/ORwoLA?editors=1010
- TheRealPomax 8y agoYou just spotted an eight year old contextual feature. While the parser will leave a path "open", only signalling an explicit "close" when it sees `z` or `Z`, it still signals the start of a new path when it sees an `m` or `M` somewhere mid-path. And that's why you're seeing closed shapes even though there don't appear to be any in the original SVG: There is no such thing as an "open path" in glyph outlines used in fonts (which was the context of this exploratory), so whenever the parser signals a "new path" signal, even when not preceded by a "close path" signal, that's automatically a closed path and the receiver code I wrote treats it as such. (The starting SVG string was a straight graphics instruction dump from a OpenType-CFF glyph charstring, although I can't for the life of me remember which typeface it came from... it's been a while)