Open siiky opened 2 years ago
Lagrange checks the MIME type and sees it starts with image/
, so it is assumed to be some sort of image.
SVG is a bit tricky to support because it requires additional dependencies. As the app is cross-platform, this would mean finding and setting up a suitable library/API for Windows, macOS/iOS, Linux, *BSD/other Unix, and Android – a sizable time investment.
I've been considering a different approach using the MIME hooks content filtering mechanism. The idea would be to allow configuring external tools that dynamically convert content to formats displayable by the app, handling the resizing and caching aspects as needed by the UI. This way, any command-line SVG-to-PNG tool could be used to display SVG images seamlessly in the app. On mobile platforms, it could be reasonable to implement this via the native APIs as well, via a build-in hook.
Can't SDL2 display SVG?
@CyberTailor No, SVG is not supported afaik. There might be SDL-compatible 3rd party libraries for rendering SVG, though.
Just searched the issues/PRs and nothing came up. Also searched the repo and the only hit seems to be something to do with fonts. Weird...
Are there plans to support SVG images? Or am I perhaps missing something?
I'm using Lagrange v1.13.7 installed with Nix, and I get this:
So apparently Lagrange knows it's an image, just can't load it. Here's an example file, genereated with GraphViz:
Thanks for the awesome browser!