Skip to content

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

Closed
@lowlighter

Description

@lowlighter

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions