Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature request] simplify nested uses #291

Open
JoKalliauer opened this issue Feb 22, 2022 · 0 comments
Open

[feature request] simplify nested uses #291

JoKalliauer opened this issue Feb 22, 2022 · 0 comments

Comments

@JoKalliauer
Copy link

Input

SVG-File

<?xml version="1.0" encoding="UTF-8"?>
<svg viewBox="0 0 40 30" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
 <defs>
  <text id="a" x="5" y="20">no g</text>
  <use id="b" xlink:href="#a"/>
 </defs>
 <use xlink:href="#b"/>
</svg>

Desired Output

simplify nested use and concatenate transforms

<?xml version="1.0" encoding="UTF-8"?>
<svg viewBox="0 0 40 30" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
 <defs>
  <text id="a" x="5" y="20">no g</text>
  <use id="b" xlink:href="#a"/>
 </defs>
 <use xlink:href="#a"/>
</svg>

Reason: Librsvg-Bug

see: https://commons.wikimedia.org/wiki/File:Librsvg_bug_nested_use.svg and https://phabricator.wikimedia.org/T276684

Copyright

Author: Cmglee

License: CC-BY-SA 4.0

Source: https://commons.wikimedia.org/wiki/File:Librsvg_bug_nested_use.svg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant