wader / ansisvg

Convert ANSI to SVG
MIT License
89 stars 9 forks source link

SVG is shown as black box in Firefox #48

Open patrislav1 opened 6 months ago

patrislav1 commented 6 months ago

Today I used ansisvg generated files for the first time in my blog. It is a simple mkdocs generated static site.

When loading the page for the first time, Firefox doesn't show the SVG content but only a black box. It will start rendering it correctly when I reload the page. I observed the same behavior when using ansisvg files in gitlab issue conversations at work, but I suspected a gitlab bug. Now I see the same in my blog.

It looks a bit like a Firefox issue, since it doesn't reproduce in Chrome or Safari. But OTOH maybe we're doing something out of spec and Chrome/Safari are just robust enough to not stumble over it? Maybe it has to do with the font embedding? (I have to check if the bug reproduces when not using embedded font).

wader commented 6 months ago

Interesting, yes i would also suspect embedded font. Does the black box have the same size before and after reload? yes please see if how it works with no embedded. Maybe also interesting to test using grid mode?