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

Does not read all paths #2

Open
Flamedek opened this issue Apr 7, 2016 · 4 comments
Open

Does not read all paths #2

Flamedek opened this issue Apr 7, 2016 · 4 comments

Comments

@Flamedek
Copy link

Flamedek commented Apr 7, 2016

Using this with an example path or some of the downloaded svg paths works fine. But when I try with a custom path, exported with Illustrator it messes up. Either by crashing or displaying a wrong path.

For example this path here:

original size=144:
M3,67 L110,1 L218,68 H148 v80 H252 V67 h78 V317 h54 l-96,64 L187,317 h65 V223 H152 v96 H65 V67 H3 Z

It works fine in all other programs/online services I have tried, but not with this project. It should look like an H (as a logo), but instead it looks like this:
image

Any idea what's going on?

@Flamedek
Copy link
Author

Flamedek commented Apr 9, 2016

I solved my issue by manually translating the path to use only line-to commands.

original size=100:
M12,18 l10,0 l0,61 l20,0 l0,-20 l20,0 l0,20 l-10,0 l20,15 l20,-15 l-10,0 l0,-61 l-20,0 l0,20 l-20,0 l0,-20 l10,0 l-20,-15 Z

Wasn't too hard as it is a fairly small and square path. But there seems to be an issue in correctly reading H and V commands. Somewhere in SvgPathParser I suppose. Specifically the lowercase versions.

@rohansood42
Copy link

@Flamedek How did you do that? Any tool or did you create the svg using lines only?

@uditunpluged
Copy link

@Flamedek how did you convert that path? Pls. explain.

@uditunpluged
Copy link

SOLVED!!!!!

Earlier I was using paths in a SVG file generated by Adobe Illustrator. Was Not working.
Next what I did was, I used GIMP to create same path, exported that path to a file and then used that path in my code.
It worked for me.

USE GIMP!!

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

3 participants