14 releases (7 breaking)

0.8.1 Jun 11, 2022
0.8.0 Sep 12, 2021
0.7.0 Sep 4, 2021
0.5.0 Aug 12, 2019
0.1.1 May 23, 2018

#321 in Parser implementations

Download history 6871/week @ 2022-04-27 7065/week @ 2022-05-04 7676/week @ 2022-05-11 6428/week @ 2022-05-18 6189/week @ 2022-05-25 5723/week @ 2022-06-01 5839/week @ 2022-06-08 5651/week @ 2022-06-15 4893/week @ 2022-06-22 5560/week @ 2022-06-29 5613/week @ 2022-07-06 5226/week @ 2022-07-13 5254/week @ 2022-07-20 5790/week @ 2022-07-27 6762/week @ 2022-08-03 5322/week @ 2022-08-10

23,908 downloads per month
Used in 157 crates (14 directly)

MIT/Apache

135KB
3.5K SLoC

svgtypes

Build Status Crates.io Documentation Rust 1.31+

svgtypes is a collection of parsers for SVG types.

Supported SVG types

Features

  • Complete support of paths, so data like M10-20A5.5.3-4 110-.1 will be parsed correctly.
  • Implicit path commands will be automatically converted into explicit one.
  • Some SVG2 data types support.
  • Pretty fast.

Limitations

  • Accepts only normalized values, e.g. an input text should not contain   or &data;.
  • All keywords must be lowercase. Case-insensitive parsing is supported only for colors (requires allocation for named colors).
  • The <color> followed by the <icccolor> is not supported. As the <icccolor> itself.
  • System colors, like fill="AppWorkspace", are not supported. They were deprecated anyway.

Safety

  • The library should not panic. Any panic considered as a critical bug and should be reported.
  • The library forbids unsafe code.

Alternatives

None.

License

Licensed under either of

at your option.

Contribution

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 dual licensed as above, without any additional terms or conditions.

Dependencies