nanosvg: Fix nanosvg default stroke width to assume 0 instead of 1px

Nanosvg assumes that an unspecified stroke width is 1px, whereas the SVG
specification specifies it should be read as 0px. This causes problems
when scaling factors are applied to 0px lines, leading to them being
misinterpeted by our import.

This commit fixes the nanosvg assumption by setting the initial stroke
width to 0 instead of 1px.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13353
This commit is contained in:
Kliment 2023-01-31 15:30:14 +01:00 committed by Seth Hillbrand
parent f34aa947d3
commit 327956ae27
1 changed files with 1 additions and 1 deletions

View File

@ -588,7 +588,7 @@ static NSVGparser* nsvg__createParser()
p->attr[0].fillOpacity = 1;
p->attr[0].strokeOpacity = 1;
p->attr[0].stopOpacity = 1;
p->attr[0].strokeWidth = 1;
p->attr[0].strokeWidth = 0;
p->attr[0].strokeLineJoin = NSVG_JOIN_MITER;
p->attr[0].strokeLineCap = NSVG_CAP_BUTT;
p->attr[0].miterLimit = 4;