lovell / sharp

High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, AVIF and TIFF images. Uses the libvips library.
https://sharp.pixelplumbing.com
Apache License 2.0
28.58k stars 1.28k forks source link

SVG polygon clip path not respected on text node #2572

Open TrevorSayre opened 3 years ago

TrevorSayre commented 3 years ago

Are you using the latest version? Is the version currently in use as reported by npm ls sharp the same as the latest version as reported by npm view sharp dist-tags.latest?

Yes, sharp@0.27.1

What are the steps to reproduce?

const { data: svg } = await axios({
  url: "https://etg.dek.im/deck/08mqs066uq066ui067ar047ne018pj.svg",
  responseType: "arraybuffer",
});

const png = await sharp(svg).png().toBuffer();

What is the expected behaviour?

Are you able to provide a minimal, standalone code sample, without other dependencies, that demonstrates this problem?

See above.

Are you able to provide a sample image that helps explain the problem?

image

What is the output of running npx envinfo --binaries --system?

System: OS: macOS 10.15.7 CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz Memory: 1.26 GB / 16.00 GB Shell: 5.7.1 - /bin/zsh Binaries: Node: 12.18.3 - ~/.n/bin/node Yarn: 1.22.10 - /usr/local/bin/yarn npm: 6.14.9 - ~/.n/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman

lovell commented 3 years ago

Please can you report this upstream at https://gitlab.gnome.org/GNOME/librsvg

$ rsvg-convert -v
rsvg-convert version 2.51.0
$ rsvg-convert 08mqs066uq066ui067ar047ne018pj.svg > out.png

serprex commented 3 years ago

https://gitlab.gnome.org/GNOME/librsvg/-/issues/681 created upstream