On Thu, 17 Nov 2005, Henning Pingel wrote:
Date: Thu, 17 Nov 2005 15:46:25 +0100 (MET) From: Henning Pingel <henning.pingel@...26...> Reply-To: inkscape-user@lists.sourceforge.net To: inkscape-user@lists.sourceforge.net Subject: [Inkscape-user] Cut off digits after decimal point automatically?
Hi,
Is it possible to reduce the size
If you are really concerned about size then you should be using SVGZ, that is Gzip compressed SVG files. XML has a tendency to be verbose but Gzip compression is an ideal way to compensate for that and is an integral part of the SVG standard.
of a SVG file by cutting off (some or all of) the digits of numbers behind the decimal point automatically?
Now if you want cleaner more readable SVG that is another issue but knowing your real motivations will make it easier for developers to fix the real problem rather than treating the symptoms.
AFAIK work has already been committed to reduce this issue and at least trim the trailing zeros (I vaguely recall a bug report) and I strongly encourage you to try out a nightly build or even the testing prereleases for 0.43 (or check the RFE tracker).
With careful use of a Grid and Snap to Grid you might be able to futher reduce the complex decimals output in your SVG (or maybe not, but I'd at least try it).
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.0585089px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000" id="path1310" />
Part of the reason I asked above if you are not only concerned about file size but are also interesed in issues like clarity of markup was because then there are other changes you might be interested in.
I previously asked about support for SVG tags like circle and rect rather than using paths for everything as it would produce much more readable code but it seems the techinical infrastructure required to allow this would be a lot of work and not practical at this time. (And I should clarifly that while I think it would be nice to have there are many other features which would be more important, nicer to have and easier to do.)
Another thing which might be helpful would be including some whitespace and more linebreaks to the style information (which gzip will do a fine job of compressing) because not only could this make the markup more readable it and would be a big help to anyone committing Inkscape SVG into a Version Control System like CVS or Subversion (which I assume is why Sodipodi added so many line breaks into the markup in the past).
(I'll try and remember to file a request, it is something I've been pondering but it isn't a big deal because most people dont tinker with the markup quite as obsessively as I like to do.)
Thanks in advance!
Sincerely
Alan Horkan
Inkscape http://inkscape.org Abiword http://www.abisource.com Dia http://gnome.org/projects/dia/ Open Clip Art http://OpenClipArt.org
Alan's Diary http://advogato.org/person/AlanHorkan/