I should be able to take a stab at this in Python. I will get back to you when I get time to try this. Thanks!
If you really going to tackle it, and specially in Python, I would recommend dropping both DVISVG and SVGKit (old, unmaintained and abandoned projects) and use the excellent project EQTeXSVG by Julien Vitard: