Impreciseness when rewriting an SVG file with `usvg`.
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 4.1k
- Forks
- 348
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 3
Description
There is a difference between the svg before and after the simplification (some paths are longer, some elements are slightly larger).
It's probably not the most beautiful svg out there, but I'm not sure where the problem is (`clip-path="url(#clip-0)"` attributes ? `ClipPath` element ? The very numerous `use` elements ?)
Comparison in firefox (left is original, right is after usvg)

Options used for the call are here :
https://github.com/flxzt/rnote/blob/2ef66c5000c8ab4577ee2c2a73d2c6b5c3316d06/crates/rnote-engine/src/strokes/vectorimage.rs#L148-L164
After:

Before:

Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the usvg options in crates/rnote-engine/src/strokes/vectorimage.rs at lines 148–164 and reproduce the rewrite using the reported SVG. Compare the original and rewritten files in Firefox, focusing on the reported clip-path, ClipPath, and use cases. Done means identifying and correcting the source of the visible geometry differences, with a regression test covering the reproduction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100