I have an SVG image (attached), created in python using your standard matplotlib.pyplot, with thin blue lines and blue dots. When I place the image in the typst document using figure(image(“.svg”)), it is rendered correctly in the preview, but not in the output pdf, see below the first figure. (First image: original svg figure, 2nd is a screenshot of the output pdf) Is this a known issue, and if so, is there a workaround to make the svg work? (Other than to save to png, which does work of course, but misses the good properties of svg images) I’m using typst 0.13.
Okay. For me with the default ubuntu Document viewer, and on Firefox the output using the svg looks like the second image I posted still. I’m compiling the pdf through vscode, that is, I’m not using the web environment, if that’s of any help.
I don’t know what those 2 programs use for rendering, but if it looks the same, then it might be the same library, in which case you can open an issue, maybe they can improve how it looks.
Zooming in on the pdf using either firefox or Document viewer, I do get the same close-up as you do, and when using Okular the pdf with the svg image is rendered completely fine, even without zooming. So it’s an issue with the other pdf viewers (also on browsers on Windows it seems). Thanks in anycase! I will probably have to resort to high-resolution png files, as those are rendered correctly on any pdf viewer.