cdelker / ziamath

MIT License
20 stars 1 forks source link

librsvg does not render svg generated from ziamath correctly #85

Closed linwaytin closed 12 hours ago

linwaytin commented 14 hours ago

I found this problem on Emacs. Emacs uses librsvg for svg rendering, so I also try another program, imv, which also uses librsvg. The issue is that librsvg has trouble to show content in the svg files generated from ziamath. Most time I see nothing (a blank canvas).

Does the generated svg contain some non-standard code? Or the problem is from librsvg?

I like this package and hopefully can use it more. Thank you.

linwaytin commented 13 hours ago

I test it on a few other rendering engines. Firefox: Ok Inkscape: Ok resvg: Wrong, similar to librsvg.

cdelker commented 12 hours ago

Did you try turning off SVG2.0?

zm.config.svg2 = False

Some SVG renderers aren't compatible with the still draft SVG 2.0 specification, so this may help.

linwaytin commented 12 hours ago

Ok, that works like a charm.... Quite surprising, at least resvg claims that it has pretty good SVG2 support.

Thanks a lot. Great package!