linebender / linebender/resvg

Support for pathLength?

Open
#879 1 comment 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.