textmode.figlet.js
Add FIGlet display typography to a textmode.js sketch.
Install FigletPlugin to add FIGfont loading, selection, drawing, and measurement helpers to the sketch's Textmodifier. Use TextmodeFigFont when you need to inspect a parsed font, plan its layout, or render it without drawing to the canvas.
Sketch workflow
- Add FigletPlugin to the sketch's plugins.
- Load a
.flffile with TextmodifierFigletExtensions.loadFigFont or parse raw font data with TextmodifierFigletExtensions.parseFigFont. - Select the returned font with TextmodifierFigletExtensions.figFont.
- Draw with TextmodifierFigletExtensions.figText, or measure first with its width, height, and bounds helpers.
FigTextOptions controls layout, wrapping, direction, and per-cell colors. Use TextmodeFigFont for reusable FIGfont resources and lower-level planning.
FIGfont resources
Parsed FIGfont resources and metadata for inspecting characters and font-defined defaults.
| Name | Description |
|---|---|
| TextmodeFigFont | Parsed FIGfont resource used by figText() rendering. |
| FigCharacter | A single parsed FIGcharacter from a FIGfont. |
| FigFontHeader | Parsed FIGfont header metadata from the .flf header line. |
Layout and rendering
Options and value types that control FIGlet composition, wrapping, direction, and placement.
| Name | Description |
|---|---|
| FigTextOptions | Layout options for rendering FIGlet text. |
| FigHorizontalLayout | Supported horizontal layout modes for FIGlet rendering. |
| FigPrintDirection | Supported print directions for FIGlet text layout. |
| FigTextAlign | Horizontal alignment options for figText() placement. |
| FigTextBaseline | Vertical alignment options for figText() placement. |
| FigVerticalLayout | Supported vertical layout modes for multi-line FIGlet rendering. |
| FigWrapMode | Supported wrap modes for FIGlet text layout. |
Styling
Per-cell color values and callback context for styling rendered FIGlet text.
| Name | Description |
|---|---|
| FigTextCellContext | Public cell metadata exposed to FIGlet styling callbacks. |
| FigTextColorResolver | Resolver for per-cell FIGlet colors. |
| FigTextColorValue | Accepted color input for per-cell FIGlet styling. |
Textmodifier extensions
Methods that FigletPlugin adds to a textmode.js sketch.
| Interface | Description |
|---|---|
| TextmodifierFigletExtensions | FIGlet methods added to the textmode.js Textmodifier API when FigletPlugin is installed. |
Workflow
The plugin entrypoint that enables the FIGlet sketch workflow.
| Variable | Description |
|---|---|
| FigletPlugin | Plugin entrypoint for the FIGlet add-on. |