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

SVG path parse error #421

Open
dfung opened this issue Apr 22, 2024 · 0 comments
Open

SVG path parse error #421

dfung opened this issue Apr 22, 2024 · 0 comments
Labels

Comments

@dfung
Copy link

dfung commented Apr 22, 2024

CairoSVG generates an error when calling svg2png for this simple svg example:

<svg xmlns="http://www.w3.org/2000/svg" width="556.76" height="1080" viewBox="0 0 556.76 1080">
<path d="M364.75 477.76c-4.36.0-6.89 3.37-7.35 7.35a2e2 2e2.0 0 0-.92 23c0 9.48 14.7 9.48 14.7.0a2e2 2e2.0 0 1 .92-23C372.56 481.12 368.41 477.76 364.75 477.76z" />
</svg>

I think the issue is with the point() helper function which does not fully match up with the number definition in the SVG specification.

The point() function fails to decode this string "2e2 2e2.0 0 0-.92 23" as (2e2, 2e2, '.0 0 0-.92 23') but instead returns (2e2, 2e2.0, '0 0-.92 23'). The SVG spec does not appear to allow decimals in the exponent value.

@liZe liZe added the bug label Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants