svg2pdf
svg2pdf copied to clipboard
Converting the Rust logo doesn't work
I tried converting the Rust logo (https://upload.wikimedia.org/wikipedia/commons/d/d5/Rust_programming_language_black_logo.svg) using this tool but it looks a little off:
huh, shit
It does not seem to like the transformation of the R's path. This is related to #9. I'll look into it but unfortunately do not have a lot of bandwidth right now :(
I tried debugging this, and I think the reason is that similarly to #9, the transformation of a group doesn't seem to apply to masks. Here is a minimal example that reproduces this:
<svg version="1.1" height="200" width="200" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g transform="translate(50, 50)">
<g mask="url(#rect)">
<rect width="100" height="100" fill="green" />
</g>
<mask id="rect" >
<rect width="30" height="30" fill="white"/>
</mask>
</g>
</svg>
I tried finding the issue in the code and I suspect that something is wrong in the apply_mask
method, but unfortunately I don't really understand what is going on there with the calculations, so I haven't been able to fix this.
I'm sorry about having closed the issue, the text in PR #19 triggered the auto-close.