public inbox for [email protected]
help / color / mirror / Atom feedFrom: Jürgen Purtz <[email protected]>
To: [email protected]
Subject: Shrinking SVG (Again)
Date: Sun, 17 Nov 2019 10:28:09 +0100
Message-ID: <[email protected]> (raw)
Our current policy says that we use the two tools Graphviz (drawing
Graphs) and Ditaa (drawing ascii art) to generate SVG. The two tools are
highly specialized and bound to their original purpose. I strongly
believe that we will not be able to visualize more complex situations
like this
http://1.bp.blogspot.com/--CG_kXBFWzw/UgW5JROpbDI/AAAAAAAAAHc/9V8iwO1qluQ/s1600/arch.bmp
or that:
https://severalnines.com/sites/default/files/blog/node_5266/image5.jpg
without using other tools, which are more flexible.
In the past, we had many discussions on this topic and didn't come to a
final decision in favor on one single or a few number of such tools.
However, we came to the important and very helpful conclusion to store
two files per graphic: the original tool-specific (simple to read,
diff-able) and the generated SVG version.
Out in the wild there is the open source tool SVGO
https://github.com/svg/svgo. Its purpose is the generation of a small,
easy to read SVG file out of any other SVG file by removing all the
clutter, tools typically generate. In my opinion it's not perfect, but
it has some strong advantages: the generated files are really small and
nearly free of unnecessary information; it is flexible because a lot of
parameters control the degree of optimization; it is extensible: missing
features may be added by ourselves.
The SVGO tool is a node.js application. At Ubuntu you can install it:
sudo apt install npm nodejs
sudo npm install -g svgo
run it, e.g.:
svgo test1_ink.svg --pretty --indent=2 --precision=2 --multipass
--disable=removeComments \
--output test1_svgo.svg
Please test it with your own examples.
In contrast to our previous policy the generated file is the diff-able,
whereas the original one is hard to read.
Jürgen Purtz
Attachments:
[image/svg+xml] test1_ink.svg (6.6K, 2-test1_ink.svg)
download | view image
[image/svg+xml] test1_svgo.svg (1.8K, 3-test1_svgo.svg)
download | view image
view thread (7+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Shrinking SVG (Again)
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox