Open
Description
Hi.
Thanks so much for this package.
I am downloading svg data (for station logos in a radio app), and parsing using:
image = SVG(data: httpData)?.rasterize(with: CGSize(width: 64.0 * 3.0, height: 64.0 * 3.0), scale: 3.0, insets: UIEdgeInsets(top: -8, left: -8, bottom: -8, right: -8))
I get the following printed to the console:
[parsing error] <style> line: 2 column: 9 error: invalid
The link to the svg and the svg are below.
The svg looks ok to me, but I am far from an expert. It opens ok in Inkscape. Should SwiftDraw be able to parse this svg without an error?
Cheers,
Ian
Link is https://www.abc.net.au/core-assets/radionational/favicon.svg
svg is
<svg xmlns="http://www.w3.org/2000/svg" width="128" height="128">
<style>
g { fill: #000; }
@media (prefers-color-scheme: dark) {
g { fill: #fff; }
}
</style><g fill-rule="nonzero"><path d="M18.873 17.186c4.686-.062 10.396 1.676 14.243 6.423 1.738 1.676 4.934 9.806 4.934 9.806l19.177 50.952c2.482 6.113 9.899 6.578 12.07.465l5.959-16.073 10.177 26.779c-4.933 9.03-9.743 11.233-15.422 13.312-6.61 2.079-14.522 1.396-20.2-2.141-1.893-1.21-6.827-4.438-10.178-12.537l-20.17-56.475v51.417l7.571-21.72 9.713 27.12c-1.427 6.237-5.927 11.419-11.14 13.87-5.74 2.7-12.567 1.738-17.75-1.52C2.677 103.016 1.218 98.517 1 90.48l.062-55.607c.59-9.247 6.516-14.305 11.698-16.57 2.39-.838 3.383-1.086 6.113-1.117z"/><path d="M107.248 109.905c-4.686.093-10.395-1.676-14.243-6.424-1.738-1.675-4.934-9.805-4.934-9.805l-19.208-50.92c-2.482-6.114-9.898-6.58-12.07-.466l-5.958 16.073-10.147-26.779c4.934-9.03 9.743-11.233 15.422-13.312 6.61-2.079 14.522-1.365 20.2 2.141 1.893 1.21 6.827 4.438 10.178 12.537l20.201 56.444V38.008l-7.54 21.72-9.713-27.12c1.428-6.237 5.927-11.419 11.171-13.87 5.71-2.7 12.568-1.738 17.719 1.52 5.15 3.817 6.609 8.347 6.826 16.353l-.062 55.606c-.59 9.247-6.516 14.305-11.698 16.57-2.39.838-3.414 1.087-6.144 1.118z"/></g>
</svg>
Metadata
Metadata
Assignees
Labels
No labels