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

Known issue: About cropped/oversized SVGs and how to fix it #814

Closed
lowlighter opened this issue Jan 25, 2022 · 0 comments
Closed

Known issue: About cropped/oversized SVGs and how to fix it #814

lowlighter opened this issue Jan 25, 2022 · 0 comments

Comments

@lowlighter
Copy link
Owner

lowlighter commented Jan 25, 2022

Since metrics offers a lot of options, the resulting SVG image height needs to be computed dynamically.
This is done through a headless puppeteer instance which spawns a browser page and retrieve the getBoundingClientRect() to get dimensions.

However, because the rendering is dependant on the operating system, browser and installed fonts, SVGs might actually change across different platforms and result in oversized or cropped images.

Unfortunately I don't think there will be an easy fix, however you can try to mitigate this issue by manually setting config_padding values, which will increase or decrease height/width.

If you know how to fix it, feel free to open an issue or comment

@lowlighter lowlighter pinned this issue Jan 25, 2022
@lowlighter lowlighter changed the title About cropped/oversized SVGs and how to fix it Known issue: About cropped/oversized SVGs and how to fix it Feb 4, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Feb 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant