https://bugzilla.wikimedia.org/show_bug.cgi?id=72547

            Bug ID: 72547
           Summary: Minimize SVG output
           Product: Mathoid
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: General/Unknown
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
       Web browser: ---
   Mobile Platform: ---

The SVG produced by MathJax is a bit verbose. It is possible to reduce the size
using tools like scour (apt-get install python-scour):

scour --indent=none --shorten-ids -i /tmp/test.svg -o /tmp/test.scoured.svg

ls -lh /tmp/test*
-rw-r--r-- 1 gabriel gabriel  20K Oct 26 21:42 /tmp/test.svg
-rw-r--r-- 1 gabriel gabriel  15K Oct 26 22:05 /tmp/test.scoured.svg

After gzip -9 on each of the SVG files:
-rw-r--r-- 1 gabriel gabriel 7.3K Oct 26 21:57 /tmp/test.svg.gz
-rw-r--r-- 1 gabriel gabriel 5.5K Oct 26 22:05 /tmp/test.scoured.svg.gz

So about a 25% reduction of the compressed size, I believe without any quality
loss.

There is a partial port of scour to JS
(https://github.com/preciousforever/SVG-Cleaner), but it does miss the crucial
path simplification pass from scour.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to