donner-svg is a command line utility for rendering SVG files to PNG and previewing output in terminal environments. A convenience wrapper is checked in at tools/donner-svg, which is the recommended way to invoke it from inside the repository.
Build and run:
donner-svg always renders with Donner's CPU (tiny-skia) backend, under every build configuration. A one-shot command-line render cannot amortize the GPU backend's fixed device and shader setup cost, so the CPU path is faster for single-frame output. The GPU (Geode) backend is Donner's interactive renderer, used by long-lived surfaces such as the editor, where that setup cost is paid once across many frames.
--gif <file.gif> renders a declarative (SMIL) animation to a looping animated GIF instead of a PNG. Frames sample document time start + i / fps for every frame index i that falls before --end. When (end - start) * fps is a whole number, the animation loops seamlessly from end back to start; otherwise the last frame is shown for a full frame period. The canvas keeps its size at --start for every frame, and each side is limited to 65535 pixels. An export is limited to 10000 frames and 2^28 rendered pixels in total. The encoded file, encoder workspace, and renderer surfaces each have separate 256 MiB limits; the command also admits its snapshot and fitted-frame buffers within the workspace limit before entering the frame loop.
Each frame gets its own color table. Frames with at most 256 colors (255 without --background, which reserves one entry for transparency) are stored exactly; busier frames are reduced with median cut, which keeps large flat colors exact. Identical consecutive frames are merged into one longer frame, and opaque GIFs store only the changed region of each frame.
--preview renders the SVG directly in the terminal using Unicode quadrant block characters with 24-bit truecolor foreground and background, giving 2x2 sub-pixels per character cell.
--interactive implies --preview and adds mouse-driven selection: hover over the terminal image to see the element under the cursor, and click to lock the selection. The right-hand pane shows the DOM path and computed style of the selected element.