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

Support SVG vector-effect as ´non-scaling-stroke` #1667

Open
arnaud-secondlayer opened this issue May 21, 2024 · 0 comments
Open

Support SVG vector-effect as ´non-scaling-stroke` #1667

arnaud-secondlayer opened this issue May 21, 2024 · 0 comments
Labels
enhancement New feature or request needs triage

Comments

@arnaud-secondlayer
Copy link

arnaud-secondlayer commented May 21, 2024

SVG paths with vector-effect="non-scaling-stroke" are not rendered properly.

From https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/vector-effect#setting_vector-effect_as_non-scaling-stroke
this is the expected rendering:
Screenshot 2024-05-21 at 8 45 16 AM

With dart_pdf, we're getting this rendering:
Screenshot 2024-05-21 at 8 45 51 AM

This is the source SVG, the last triangle has attribute vector-effect="non-scaling-stroke":

<svg viewBox="0 0 500 240">
  <!-- normal -->
  <path
    d="M10,20 L40,100 L39,200 z"
    stroke="black"
    stroke-width="2px"
    fill="none"></path>

  <!-- scaled -->
  <path
    transform="translate(100,0) scale(4,1)"
    d="M10,20 L40,100 L39,200 z"
    stroke="black"
    stroke-width="2px"
    fill="none"></path>

  <!-- fixed-->
  <path
    vector-effect="non-scaling-stroke"
    transform="translate(300, 0) scale(4, 1)"
    d="M10,20 L40,100 L39,200 z"
    stroke="black"
    stroke-width="2px"
    fill="none"></path>
</svg>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs triage
Projects
None yet
Development

No branches or pull requests

1 participant