Skip to content
This repository was archived by the owner on Jun 28, 2025. It is now read-only.

Vacuum SVGs with Inkscape#117

Merged
samueldr merged 1 commit intoNixOS:masterfrom
danth:inkscape-vacuum
Apr 12, 2024
Merged

Vacuum SVGs with Inkscape#117
samueldr merged 1 commit intoNixOS:masterfrom
danth:inkscape-vacuum

Conversation

@danth
Copy link
Copy Markdown
Member

@danth danth commented Mar 23, 2024

I ran all SVG files through the following command:

inkscape --vacuum-defs --export-overwrite **/*.svg

This cleans up the definitions of any gradients and so on which are no longer used in the image.

Unlike #37 and #38, this does not affect Inkscape metadata, guides or layers.

@samueldr
Copy link
Copy Markdown
Member

Hmmm...

Just a note, to anyone looking at the history here:

It looks like files with <tspan /> elements will converged toward two states. Pick the one with the lower id numbers.

@samueldr
Copy link
Copy Markdown
Member

So, I believe this achieves a different goal from #37 and #38.

The TLDR gist of it is that it's like doing the two of those actions:

  • File → Clean Up Document
  • Save the document

So what happens doing this is that the document is cleaned (who knew) of unused things. And then the document is re-saved, which will re-adjust some positions by virtue of how inkscape works.

Though, I'll note that those positions are likely inconsistent only because of how old some of the files are.

@samueldr samueldr merged commit faefdd7 into NixOS:master Apr 12, 2024
@samueldr
Copy link
Copy Markdown
Member

Where are my manners?

Forgot to say:

👋 Hi!

Thank you for your contribution!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants