Skip to content

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

  1. Add FigletPlugin to the sketch's plugins.
  2. Load a .flf file with TextmodifierFigletExtensions.loadFigFont or parse raw font data with TextmodifierFigletExtensions.parseFigFont.
  3. Select the returned font with TextmodifierFigletExtensions.figFont.
  4. 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.

NameDescription
TextmodeFigFontParsed FIGfont resource used by figText() rendering.
FigCharacterA single parsed FIGcharacter from a FIGfont.
FigFontHeaderParsed FIGfont header metadata from the .flf header line.

Layout and rendering

Options and value types that control FIGlet composition, wrapping, direction, and placement.

NameDescription
FigTextOptionsLayout options for rendering FIGlet text.
FigHorizontalLayoutSupported horizontal layout modes for FIGlet rendering.
FigPrintDirectionSupported print directions for FIGlet text layout.
FigTextAlignHorizontal alignment options for figText() placement.
FigTextBaselineVertical alignment options for figText() placement.
FigVerticalLayoutSupported vertical layout modes for multi-line FIGlet rendering.
FigWrapModeSupported wrap modes for FIGlet text layout.

Styling

Per-cell color values and callback context for styling rendered FIGlet text.

NameDescription
FigTextCellContextPublic cell metadata exposed to FIGlet styling callbacks.
FigTextColorResolverResolver for per-cell FIGlet colors.
FigTextColorValueAccepted color input for per-cell FIGlet styling.

Textmodifier extensions

Methods that FigletPlugin adds to a textmode.js sketch.

InterfaceDescription
TextmodifierFigletExtensionsFIGlet methods added to the textmode.js Textmodifier API when FigletPlugin is installed.

Workflow

The plugin entrypoint that enables the FIGlet sketch workflow.

VariableDescription
FigletPluginPlugin entrypoint for the FIGlet add-on.