Fix for Inkscape glitches on over-optimized SVGs


Inkscape sometimes has problems with highly optimized SVG files: it usually shows up as missing points in a path, so a shape has a straight line or bump or such like.

The problem is that when Inkscape parses a path, it doesn’t split the points apart if there is a negative immediately (i.e. without a space) after another number.

The solution is to add a space. A simple regex search/replace from ([0-9])- to $1 - will fix it. Make sure not to change things that are outside of the path attribute.

Tags:  svg

Share: