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

Implement resvg renderer #20

Closed
kklemon opened this issue May 27, 2024 · 0 comments · Fixed by #23
Closed

Implement resvg renderer #20

kklemon opened this issue May 27, 2024 · 0 comments · Fixed by #23
Assignees
Labels
data conversion Converting different data representations to each other

Comments

@kklemon
Copy link
Collaborator

kklemon commented May 27, 2024

See RazrFalcon/resvg and the unofficial Python binding baseplate-admin/resvg-py.

They claim to offer an even more complete and correct implementation of SVG than, for instance, Chrome. In my tests, the results generally look very good. However, they are two major shortcomings:

  • The library is incredibly slow, probably due to lack of GPU support. Around 20 seconds to render a full Penpot page of medium complexity, e.g. Plants App.
  • Apparently no support for cross-links. This can be fixed relatively easily by inlining all asset urls.

I would still implement it as an alternative to the headless Chrome-based renderer as the latter works by taking a screenshot which is a bit hacky and does not support transparency.

@kklemon kklemon self-assigned this May 27, 2024
@MischaPanch MischaPanch added the data conversion Converting different data representations to each other label May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data conversion Converting different data representations to each other
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants