usvg
(micro SVG) is an SVG parser that tries to solve most of SVG complexity.
SVG is notoriously hard to parse. usvg
presents a layer between an XML library and
a potential SVG rendering library. It will parse an input SVG into a strongly-typed tree structure
were all the elements, attributes, references and other SVG features are already resolved
and presented in the simplest way possible.
So a caller doesn't have to worry about most of the issues related to SVG parsing
and can focus just on the rendering part.
rect
and circle
) will be converted into pathsuse
will be resolved and replaced with the reference contentsvg
will be resolved#elem
and url(#elem)
) will be resolvedswitch
will be resolvedxml:space
),
text chunks and spans resolvingfilter="contrast(50%)"
objectBoundingBox
will be replaced with userSpaceOnUse
a
, view
, cursor
, script
, no events and no animationsLicensed under either of
at your option.
Contributions are welcome by pull request. The Rust code of conduct applies.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be licensed as above, without any additional terms or conditions.