spinagram
Share them

Outputs

SVG, PNG, PowerPoint, Figma, FigJam and Excalidraw.

Pick outputs with -f on spinagram render (or formats= in Python):

BackendOutput
svgSelf-contained SVG with fonts (subset to the characters drawn) and images embedded
png2x PNG rendered from the SVG (Playwright)
pptxOne slide per diagram. Native shapes with the text inside, connectors bound to their shapes (move a box and the arrows follow), native tables. SVG icons stay vectors (PowerPoint 365 svgBlip) with a PNG fallback for other readers (SPINAGRAM_PPTX_SVG=raster turns this off)
figmaFigma Plugin-API JavaScript, run through the Figma MCP use_figma tool to build native, editable nodes
figjamFigJam board hand-off: one section per diagram, edges as native connectors bound to the boxes, icons cloned from an uploaded icon library
excalidrawOne .excalidraw scene per diagram: native shapes, arrows bound to their boxes, embedded icons, clean style (details)
spinagram render specs/ -f svg,png,pptx,figma,excalidraw -o out/

render writes <id>-<slug>.{svg,png,excalidraw}, one diagrams.pptx containing all slides, figma/<id>.js chunks and an index.html gallery (--no-gallery skips it).

See Figma and FigJam for running the Figma scripts.

SVG fonts

The SVG embeds each font face it uses. --fonts (fonts= in Python) chooses how:

ModeSVG holdsUse
subset (default)Each face cut down to the characters drawn with itSmall files that render the same everywhere
embedThe whole font files (the 0.4 output)Text you will edit in the SVG later
linkNo font data: one Google Fonts @import per familyThe smallest files, for viewers online; the fonts must be on Google Fonts
spinagram render specs/ --fonts link -o out/
import spinagram
from spinagram.backends.svg import SvgBackend, to_svg

spinagram.render(diagrams, "out/", formats=["svg", "png"],
                 backend_options={"svg": {"fonts": "link"}, "png": {"fonts": "link"}})
svg = to_svg(spinagram.scenes([d])[0], fonts="embed")     # one SVG as a string
SvgBackend(fonts="embed")                                 # the backend, for custom pipelines

The PNG is rendered from an SVG built the same way. A font that cannot be subset is embedded whole, with a warning. Subsets are identical between runs, so content hashes stay stable.

Presentations

spinagram deck deck.yaml builds a self-contained HTML presentation from a deck.yaml that lists a title, authors and sections of slides pointing at diagram ids.

On this page