Hacker News new | ask | show | jobs
by schemescape 887 days ago
Does this require a browser (or browser engine) for rendering (like Mermaid.js)? Or can it render (esp. to SVG) without a browser (like Graphviz)?

Penrose appears to be written in TypeScript, so my assumption is that it needs a browser.

3 comments

> roger is a command-line tool for generating diagrams from Penrose trios and serving local files to a local editor.

https://penrose.cs.cmu.edu/docs/ref/using

It looks like the CLI tool (@penrose/roger) just depends on a few npm packages with no browser engine and supports SVG export.
Looks like that depends on the “canvas” package, which appears to use Cairo/Pango for text, similar to Graphviz.

This is great! I wanted something I could compile (the native code) to WebAssembly for use in a Deno-based SSG, and this looks promising.

I think they were working on an Obsidian plug-in at some point, and got some primitive functionality up, but don’t know what the state of that is currently.

So possible rendering point, though I guess falls under browser engine