mcviz/mcviz — Issue #85: Minimise svg filesizes
Author: brookst
Created: 2011-12-09 16:08:39+00:00
State: open
Labels: Branch, Code Improvement, Enhancement

I was looking through the svg painter and wanted to clean up the output a bit. I've added svg groups to hold common attributes under the svg_minimise branch. The painter can make groups with a dict of default options and strip those options out of elements in the group. It's a bit hackish - I couldn't find where the glyph attributes came from, so I added a list in texglyph.py - probably should be moved or done properly. Still, it saves a few K per image.

It works ok, and doesn't seem to affect rendering for static and navigable svgs but it should be tidied up a bit, and as Peter suggests - we could move alot of styling into CSS.

Feel free to add more space saving ideas here.