Skip to content

Instantly share code, notes, and snippets.

@mxdvl
Last active December 31, 2021 17:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mxdvl/f646a6258eeceace3d8362c536541531 to your computer and use it in GitHub Desktop.
Save mxdvl/f646a6258eeceace3d8362c536541531 to your computer and use it in GitHub Desktop.
SVG logo for using as avatar.
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mxdvl
Copy link
Author

mxdvl commented Apr 22, 2020

Exporting

vips copy mxdvl-cmps.svg mxdvl-cmps.png

Notes

viewBox="0 0 16 16" keeps the coordinates small, but a large size makes sure the default export size is still large. On very small size, it's better to always have 2px stroke, so some adjustment can be made to stroke-width.

Caveats: libvps requires the xlink: before href in <use /> tags and xmlns:xlink="http://www.w3.org/1999/xlink" to the SVG declaration.

Dependencies

Make sure VIPS is installed. Maybe use Homebrew? brew install vips

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