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

svg2png the stroke attribute causes display anomalies. #419

Open
h3clikejava opened this issue Apr 8, 2024 · 1 comment
Open

svg2png the stroke attribute causes display anomalies. #419

h3clikejava opened this issue Apr 8, 2024 · 1 comment

Comments

@h3clikejava
Copy link

This is my svg file:

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 537.75 994.72">
  <defs>
    <style>
      .cls-6 {
        stroke: #ff8680;
      }

      .cls-6 {
        stroke-width: 4px;
      }
    </style>
  </defs>
  <g>
    <g>
      <path class="cls-6" d="M203.03,166.63c.26-1.03,1.62-3.71,1.91-9.28,.39-7.68-3.66-27.68-8.44-55.74-4.34-25.41-13.47-66.57-12.64-65.68,8.79,9.31,44.93,69.46,55.42,76.57,.29,.19,29.76-69.23,36.49-70.94,3.79-.97,14.51,28.68,18.07,35.06,4.22,7.57,14.9,33.45,17.31,30.35,10.01-12.88,18.04-23.74,27.31-39.85,9.85-17.12,15.26-23.7,23.72-35.1,4.77-6.42-3.05,27.07-4.21,35.1-1.1,7.56-4.74,28.5-5.86,36.05-1.81,12.08-4.6,21.69-8.3,39.37-2.72,12.99-3.54,11.97,.09,20.13,10.28,23.16-60.77,23.54-66.03,23.01-15.76-1.58-77.46-8.45-74.83-19.05h-.01Z" />
    </g>
  </g>
</svg>

image

after CairoSVG svg2png:
image

@liZe
Copy link
Member

liZe commented Apr 10, 2024

Hi!

I think there’s something "wrong" with your path. I get artifacts (the same, or other ones) with different SVG libraries, at different zoom levels:

With librsvg:
Capture d’écran du 2024-04-10 12-58-55

With WebKit:
Capture d’écran du 2024-04-10 12-59-48

With Chrome:
Capture d’écran du 2024-04-10 13-00-49

With Firefox:
Capture d’écran du 2024-04-10 13-02-05

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

2 participants