SVG generated from mermaid-cli does not show text
Mermaid is a popular diagram markdown format. I've been using the CLI locally to generate diagrams for personal projects. I generally like using Image Viewer for inspecting images due to its simplicity and minimialism, but unfortunately it doesn't to be able to render the text generated by the mermaid CLI.
Example Diagram
Here's an example of a simple mermaid diagram foo.mmd
:
graph TD
Foo ---> Qux;
Bar ---> Qux;
Baz ---> Qux;
Here we can see the gitlab mermaid renderer shows the text on each node correctly:
graph TD
Foo ---> Qux;
Bar ---> Qux;
Baz ---> Qux;
In the following screenshot of Image Viewer however, we can see the text isn't showing up:
This was generated with the following command:
$ mmdc --version
10.3.1
$ mmdc -i "/path/to/foo.mmd" -o "/path/to/foo.svg"
The following is the SVG file itself in case it's useful to inspect for unsupported tags, etc:
Debugging Information
- Version: 45.3
- App ID: org.gnome.Loupe
- Sandboxed: false
OS Information
BUG_REPORT_URL="https://github.com/NixOS/nixpkgs/issues"
BUILD_ID="24.05.20240113.9b19f5e"
DOCUMENTATION_URL="https://nixos.org/learn.html"
HOME_URL="https://nixos.org/"
ID=nixos
LOGO="nix-snowflake"
NAME=NixOS
PRETTY_NAME="NixOS 24.05 (Uakari)"
SUPPORT_URL="https://nixos.org/community.html"
VERSION="24.05 (Uakari)"
VERSION_CODENAME=uakari
VERSION_ID="24.05"