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

Migrate to resvg? #2141

Closed
baseplate-admin opened this issue Apr 30, 2024 · 2 comments
Closed

Migrate to resvg? #2141

baseplate-admin opened this issue Apr 30, 2024 · 2 comments

Comments

@baseplate-admin
Copy link

Hi,

it seems that resvg has better svg support than cariosvg.

Would you guys be willing to shift to resvg if i write a wrapper over it?

@liZe
Copy link
Member

liZe commented Apr 30, 2024

Hi!

Thanks for your proposal, but I don’t think that we’re interested, for many different reasons.

  1. First of all, we don’t use CairoSVG anymore, because WeasyPrint dropped Cairo a few years ago. We replaced it by an internal library inspired by CairoSVG, but that uses pydyf instead of Cairo for the output.

  2. The current solution used in WeasyPrint is able to generate vector shapes directly in a PDF through pydyf. As far as I can tell (I can’t find the documentation), resvg generates raster images.

  3. We try to depend on less non-Python dependencies (see Get rid of external dependencies #841).

  4. The current SVG implementation is limited (and some of its code is pretty awful), but it’s not ridiculous. If you miss some features or have blocking bugs, you can report them, and we’ll see if it’s possible to fix that.

  5. We believe in web diversity, that’s why we’ve had the stupid idea to write our own HTML/CSS rendering engine 🙃. Let’s improve this implementation of SVG instead of killing it!

So… Long live resvg, and long live WeasyPrint’s implementation of SVG.

@baseplate-admin baseplate-admin closed this as not planned Won't fix, can't repro, duplicate, stale May 1, 2024
@baseplate-admin
Copy link
Author

Alright thanks for insight

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

2 participants