card_render
Rasterise an SVG card into a PNG that card: cues resolve to, keeping the source for re-editing and reporting font substitutions.
Instructions
Rasterise assets/cards/<name>.svg into the PNG card:<name> shows.
Author the SVG under the project's assets/cards/, then render it here;
both files are kept, so a card can be re-edited rather than redrawn. The
PNG is what a card: cue resolves to, so a card is not usable until this
has run.
width/height are given together or not at all and set the render
size — the document is drawn at that scale rather than rasterised and
resampled — and they fit rather than distort, so a size at a different
aspect from the document's comes back smaller on one axis. Omitted, the
document renders at its own declared size.
Every call reports the fonts the document names and what fontconfig will
actually draw. Read font_warnings: a card naming a face this machine
lacks renders pixel-identically to one naming a face it has, so nothing
downstream can catch the substitution.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The card to rasterise: `assets/cards/<name>.svg` becomes the PNG that `card:<name>` resolves to. | |
| path | No | The project directory to act on. Omit it — the usual case — when this server is bound to a project (started as `proofcut -C DIR mcp`, or inside a project; `ping` says which): it then resolves to that one bound project, a relative path resolves against it, and a path outside it is refused by name. Unbound, `path` is the whole address and omitting it refuses rather than guessing. | |
| width | No | Render width. The document is *drawn* at this scale rather than resampled, so text stays sharp, and it fits rather than distorts. Given together with `height` or not at all; omitted, the document renders at its own declared size. | |
| height | No | Render height, given together with `width` or not at all. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||