 	}
 
 	fileprivate func getStrokeWidth(_ styleParts: [String: String]) -> Double {
-		var width: Double = 1
 		if let strokeWidth = styleParts["stroke-width"] {
-			let strokeWidth = strokeWidth.replacingOccurrences(of: " ", with: "")
-			width = Double(strokeWidth)!
-		}
-		return width
+            let characterSet = NSCharacterSet.decimalDigits.union(NSCharacterSet.punctuationCharacters).inverted
+            let digitsArray = strokeWidth.components(separatedBy: characterSet)
+            let digits = digitsArray.joined(separator: "")
+            if let value = NumberFormatter().number(from: digits) {
+                return value.doubleValue
+            }
+		}
+        return 0
 	}
 
 	fileprivate func getStrokeCap(_ styleParts: [String: String]) -> LineCap {

		return Circle(cx: getDoubleValue(element, attribute: "cx") ?? 0, cy: getDoubleValue(element, attribute: "cy") ?? 0, r: r)
	}

	fileprivate func parseEllipse(_ ellipse: XMLIndexer) -> Ellipse? {
		guard let element = ellipse.element,
			let rx = getDoubleValue(element, attribute: "rx"),
			let ry = getDoubleValue(element, attribute: "ry")
		, rx > 0 && ry > 0 else {

			return .none
		}

		return Ellipse(cx: getDoubleValue(element, attribute: "cx") ?? 0, cy: getDoubleValue(element, attribute: "cy") ?? 0, rx: rx, ry: ry)
	}

	fileprivate func parsePolygon(_ polygon: XMLIndexer) -> Polygon? {

			case "use":
				return parseUse(node, fill: getFillColor(styleAttributes), stroke: getStroke(styleAttributes), pos: position, opacity: getOpacity(styleAttributes))
            case "mask":
                return parseMask(node)
			default:
				print("SVG parsing error. Shape \(element.name) not supported")
				return .none
