draw_text
Draws text onto Aseprite layers using built-in or system fonts, with live and batch modes for sprite editing.
Instructions
Draws text onto a layer. In live mode it uses Aseprite's text renderer with any font Aseprite knows (its built-in 'Aseprite' pixel font, or an installed system font by name such as 'Arial'). In batch mode, or with font='builtin', it uses a built-in 5x7 pixel font that can be scaled by whole numbers. Multi-line text with \n is supported.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | ||
| y | No | ||
| font | No | 'builtin', 'Aseprite', or a system font name (live mode) | |
| save | No | Batch mode: write changes back to the sprite file (default true) | |
| size | No | Font size for Aseprite/system fonts (default 6) | |
| text | Yes | ||
| align | No | Horizontal alignment relative to x | |
| color | No | Default black | |
| frame | No | 1-based frame number. Defaults to the active frame (or 1). | |
| layer | No | Layer name, 'Group/Child' path, or 1-based index from get_sprite_info. Defaults to the active layer. | |
| scale | No | Integer scale for the builtin font | |
| sprite | No | File path, open tab title, or sprite id. Defaults to the active sprite (live). Batch mode needs a file path. | |
| backend | No | auto (default): live Aseprite if connected, else headless batch | |
| opacity | No | ||
| lineHeight | No | Other fonts: pixels from one line to the next | |
| lineSpacing | No | Builtin font: pixels between lines (default 1) | |
| measureOnly | No | Only return the text size, draw nothing | |
| letterSpacing | No | Builtin font: pixels between letters (default 1) |