Light Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

SVG parsing improvements - USVG port? #1280

Open
Open
SVG parsing improvements - USVG port?#1280

Description

https://github.com/RazrFalcon/resvg/tree/master/usvg

It would be nice to either:

  • port library to c# (That's the best way IMO)
  • compile library to every platform (iOS / MacOS, Android, Windows) (c interop)

That way parsing of SVG files would be greatly improved. Are there any
Rust devs here?

Key features of the simplified SVG

  • No basic shapes (rect, circle, etc). Only paths
  • Simple paths:
    • Only MoveTo, LineTo, CurveTo and ClosePath will be produced
    • All path segments are in absolute coordinates
    • No implicit segment commands
    • All values are separated by a space
  • All (supported) attributes are resolved. No implicit one
  • use will be resolved
  • Invisible elements will be removed
  • Invalid elements (like rect with negative/zero size) will be removed
  • Units (mm, em, etc.) will be resolved
  • Comments will be removed
  • DTD will be resolved
  • CSS will be resolved
  • style attribute will be resolved
  • inherit attribute value will be resolved
  • currentColor attribute value will be resolved
  • Paint fallback will be resolved
  • No script (simply ignoring it)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions