Draw letters
glyph_drawDraw or redraw letters of the open font: glyphs {name: {ops, adv}}, up to 40 a call. A name is the character itself ("A", "é", "&") or its glyph name (A, eacute, ampersand, zero). ops: shapes in font units. adv: the letter's width, a number, or {lsb, rsb} (the space left and right of the ink); left out, the first drawing gets its ink's width plus its left side mirrored. add: true keeps what is there and adds to it. components [{glyph, dx, dy}] makes a letter from others (it follows them when they change). A new glyph needs u (its code point). Letters are drawn in font units: 1000 to the em, x to the right, y DOWN, the baseline at y = 0. So the cap height is y = -700, the x-height y = -500, the ascender -800 and the descender +200 (unless font_metrics changed them). A letter starts at x = 0 on the left; its width (adv) is where the next one starts. Shapes are canvas ops: path {d}, rect, polygon, circle, ellipse, and group or use of them (anything else is drawn on the canvas but left out of the file). Fill only: strokes are not outlines (canvas_edit outline turns them into shapes). Counters (the hole in o, the eye of e) are found and cut for you; holes: false keeps a path as drawn. Overlapping shapes are fine: the file keeps them (merge on export joins them). A letter made from parts (Aacute is A plus acute) fills in by itself once its parts are drawn. The reply says what each letter's checks found; font_proof shows them in words.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"glyphs": "<glyphs>"
},
"name": "glyph_draw"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| next | No | ||
| note | No | what you drew, for the replay ("rounder bowls") | |
| proof | No | attach a proof of these letters (true), or of this text | |
| canvas | No | the font's link or id (default the one you have open) | |
| glyphs | Yes | ||
| model_label | No | ||
| expected_revision | No |