-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Labels
Comments
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
The text was updated successfully, but these errors were encountered: