SVG stroke width


#1

It looks like the SVG parser has the wrong default stroke-width, which looks like it needs to be "1".

Example SVG:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
     viewBox="0 0 72 20" enable-background="new 0 0 72 20" xml:space="preserve">
<path fill="none" stroke="#A2C7D4" d="M64.8,1.7c0,0,6.2,0,6.2,6.2v4.2c0,0,0,6.2-6.2,6.2H1.1V1.7H64.8L64.8,1.7z"/>
</svg>

It looks in JUCE like it does in Firefox etc only if one adds stroke-width="1" to the path element.

See fix at https://github.com/yairchu/JUCE/commit/e9e53a758d14f4b102d9c28292958f492e0376aa

Cheers, Yair


#2

Ah, good find, thanks!