Support for pathLength?
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 4.1k
- Forks
- 348
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 3
Description
Hi,
resvg ignores `pathLength` attribute ([SVG specification](https://www.w3.org/TR/SVG11/paths.html#PathLengthAttribute)).
```svg
```
Setting `pathLength='1000'` vs `pathLength='10000'` should affect the rendered length of the dashes (and gaps) of the stroke. This is specified by SVG 1.1 standard (SVG 2 extends the attribute to `rect`, `circle`, etc.)
For reference, I tested the example in a few programs. Here is if they support the `pathLength` attribute correctly:
✅ Chrome (version 130.0.6723.117 arm64)
✅ Firefox (version 134.0.2, aarch64)
✅ Safari (version 17.4.1)
❌ Inkscape (Inkscape 1.3.2)
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 by reading the linked SVG 1.1 PathLengthAttribute specification and reproducing the supplied SVG example with resvg. Trace how path strokes use stroke-dasharray and determine where pathLength normalization is absent. Done means changing pathLength values alters dash and gap lengths as specified, with coverage for the example behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- computer-graphics
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100