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

rsvg_svg() adds whitespace on the edges of rectangular svgs #44

Open
willgearty opened this issue Oct 22, 2024 · 1 comment
Open

rsvg_svg() adds whitespace on the edges of rectangular svgs #44

willgearty opened this issue Oct 22, 2024 · 1 comment

Comments

@willgearty
Copy link

When I use rsvg_svg() to process a square svg (like this one: 101-K-pre, the output svg looks the same as the input (101-K-post).

However, when I use rsvg_svg to process a rectangular svg (like this one: 435-K-pre), the output svg has extra white space on the left and right sides (435-K-post).

I noticed that the dimensions in the output files lack any decimals that the input dimensions had (as if floor() was called on them). Is this intentional? Or perhaps part of the CAIRO process/spec? Any way around this? I tried setting a width/height in rsvg_svg(), but that just seems to scale the dimensions after they are floor()ed. Any help would be appreciated.

@willgearty
Copy link
Author

willgearty commented Oct 22, 2024

These are pretty small examples, but you can notice the white edges if you open the file in inkscape or the like:
image

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

1 participant