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

SVGs opening as blank documents in vector editing software #16

Closed
lessonhacker opened this issue Nov 13, 2021 · 9 comments
Closed

SVGs opening as blank documents in vector editing software #16

lessonhacker opened this issue Nov 13, 2021 · 9 comments
Assignees
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@lessonhacker
Copy link

In multiple vector editing applications the SVG opens as an empty file in the correct proportions, in particular neither Adobe Illustrator CC 2022 (Mac) or Inkscape can open these files.

@stevebauman
Copy link
Owner

Hi @lessonhacker! You're right -- I can't even open the SVG's in photopea.com. Let me get this fixed 👍

@stevebauman stevebauman added the bug Something isn't working label Nov 14, 2021
@stevebauman stevebauman self-assigned this Nov 14, 2021
@stevebauman stevebauman added the wontfix This will not be worked on label Nov 18, 2021
@stevebauman
Copy link
Owner

Okay, this is apparently going to be near impossible to fix due to show shiki generates tokens. I investigated very thoroughly, and no one has been able to export shiki tokens to SVG, even on the shiki playground site, SVG's don't get generated properly.

We'll have to wait on this one 👍

@stevebauman
Copy link
Owner

I've also tried using paid software, but even it can't handle processing shiki tokens...

@lupinitylabs
Copy link
Contributor

lupinitylabs commented Dec 30, 2021

Maybe it's a good idea to disable SVG export altogether...
Looking at the SVG source, it's basically HTML & CSS wrapped in an SVG tag. That's not really helpful... and also misleading. I am tempted to always save and keep a format that's scalable and lossless, but now I'm glad I didn't use SVG export. 😅

Carbon does exactly the same, by the way...

@lessonhacker
Copy link
Author

lessonhacker commented Dec 30, 2021 via email

@stevebauman stevebauman pinned this issue Dec 4, 2022
@stevebauman
Copy link
Owner

This may be the ticket: https://www.npmjs.com/package/dom-to-svg

@stevebauman
Copy link
Owner

stevebauman commented Jan 30, 2023

Results aren't perfect using dom-to-svg, but they're the best I've seen. Shadows are lost unfortunately, along with background gradients.

Is the below good enough for you guys?

Untitled-1

Another example:

Untitled-1 (5)

@lupinitylabs
Copy link
Contributor

I don't know how it looks for you, but it's completely shot in Firefox:

grafik

@stevebauman
Copy link
Owner

Yea it’s similar to that (on my phone at the moment so can’t post screenshot of Chrome example). Looks like the tech is getting there but not entirely yet.

I’ll keep this issue closed for the time being. I may dive into this package and see if I can commit any PRs to resolve these issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants