2 votes

EchoSVG: Pure Java SVG renderer with level 4 CSS selectors

2 comments

  1. [2]
    DaveJarvis
    Link
    EchoSVG is a library for handling Scalable Vector Graphics (SVG) images for various purposes, such as viewing, generation, or manipulation. By leveraging CSS4J, the library supports level 4 CSS...

    EchoSVG is a library for handling Scalable Vector Graphics (SVG) images for various purposes, such as viewing, generation, or manipulation. By leveraging CSS4J, the library supports level 4 CSS selectors and RGBA color values (colors with alpha channel). To my knowledge, there are no other cross-platform, FOSS libraries that can correctly render MermaidJS diagrams outside of a web browser. I've tried Apache Batik, svgSalamander, resvg, rsvg-convert, svglib, CairoSVG, ConTeXt, and QtSVG.

    EchoSVG has released an update to bridge that gap. It's a little rough around the edges, so I figured more attention may help move the project along.

    This is notable because it means there's now a path forward to typeset PDF documents that include Mermaid diagrams.

    2 votes
    1. Greg
      Link Parent
      Very interesting, I'll have to take a look at this - I was doing some SVG work earlier in the year and I was very surprised to find out that Illustrator is capable of producing files that it can't...

      Very interesting, I'll have to take a look at this - I was doing some SVG work earlier in the year and I was very surprised to find out that Illustrator is capable of producing files that it can't then properly read back in, despite them being totally valid; I never did find an open source tool that was able to handle them correctly. The workflow we ended up with depends on accessing the macOS Preview engine via the CLI, so switching to something open and cross platform would be a big win.

      1 vote