-
-
Notifications
You must be signed in to change notification settings - Fork 859
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
SVG not showing transparency applied to black #4700
Comments
Without having tested it, I think this line in your helper function is problematic when
You first replace the |
That's the SVG generated for the black one: <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/ svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 512 512" version="1.1" xmlns="http://www.w3.org/ 2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http:// www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke- linejoin:round;stroke-miterlimit:1.5;">
<rect x="30.361" y="30.361" width="451.277" height="451.277" style="fill:#0000003300033;stroke:#00000033;stroke-width:1px;"/> </svg> That fill doesn't look very correct... |
Guess I will close this then, as this is more of a logic bug. It should work fine once you fix that. |
Description
I am not entirely sure if issue #2546 is the same as this one or not. I have made a demo to showcase the issue.
I have created a simple demonstration. Attached is a plain white square svg, filled white with a black stroke. In Typst, I am replacing the values
"#000"
and#fff
with new colors. To compare, I also print asquare
with matching fill.The white square svg: https://github.com/user-attachments/assets/288902cc-2cfc-4fa2-9111-eead8bde20e5)
The demo:
The result:
As you can see, the final SVG row is completely unchanged.
Reproduction URL
No response
Operating system
macOS
Typst version
The text was updated successfully, but these errors were encountered: