Skip to content
Vincent Bermel edited this page Mar 13, 2023 · 4 revisions

These are the Inkscape settings to use when saving a file as an optimised SVG, reducing filesize and making it consistent with other icons in repo. These settings have been carefully selected so as not to mess with librsvg (used by GNOME) and SVG Tiny (used by KDE). Pull requests which don't use these settings will not be accepted.

Options

Number of significant digits for coordinates: 3

  • Shorten colour values
  • Convert CSS attributes to XML attributes
  • Collapse groups
  • Create groups of similar attributes
  • Keep editor data
  • Keep unreferenced definitions
  • Work around renderer bugs

SVG Output

Document Options

  • Remove the XML declaration
  • Remove metadata
  • Remove comments
  • Embed raster images
  • Enable viewboxing

Pretty-printing

  • Format output with line-breaks and indentation

Indentation characters: space

Depth of indentation: 1

  • Strip the "xml:space" attribute from the root SVG element

IDs

  • Remove unused IDs
  • Shorten IDs

Prefix shortened IDs with:

  • Preserve manually created IDs not ending with digits

Preserve the following IDs:

Preserve IDs starting with:

Clone this wiki locally