adobe / adobe/svg-native-viewer

Gradients referencing other gradients that are defined later

Open
#156 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
164
Forks
42
PR merge metrics
No merged PRs in 30d

Description

At the moment, SNV does support one gradient using another one by the `xlink:href` attribute, however, it doesn't support it if the referenced element comes later on. This needs to be fixed as it's very common in fonts like Trajan. I'm thinking perhaps we could iterate and keep unresolved references and at the end of the traversal we can throw an error if unresolved references still exist.

Contributor guide

Open the contributing guide

Research direction

Start by tracing how xlink:href resolves gradient references during SVG Native document traversal, then reproduce the case with a gradient that references one defined later, as described in the issue. The fix is complete when later-defined gradients resolve correctly and traversal reports an error if references remain unresolved at the end.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.