FigletTextWidget
Namespace: Hex1b.Widgets
Assembly: Hex1b.dll
Displays large ASCII-art ("FIGlet") text rendered from a .
public sealed record FigletTextWidget : Hex1bWidget, IEquatable<Hex1bWidget>, IEquatable<FigletTextWidget>Inheritance
Object → Hex1bWidget → FigletTextWidget
Implements
Constructors
FigletTextWidget(string)
Displays large ASCII-art ("FIGlet") text rendered from a .
Parameters:
Text(String): The text to render. May contain newline characters which force vertical breaks.
public FigletTextWidget(string Text)Properties
Font
The font used to render . Defaults to .
Returns: FigletFont
public FigletFont Font { get; init; }HorizontalLayout
Horizontal layout mode. defers to the font's preference.
Returns: FigletLayoutMode
public FigletLayoutMode HorizontalLayout { get; init; }HorizontalOverflow
How to handle horizontal overflow. Defaults to .
Returns: FigletHorizontalOverflow
public FigletHorizontalOverflow HorizontalOverflow { get; init; }Text
The text to render. May contain newline characters which force vertical breaks.
Returns: String
public string Text { get; init; }VerticalLayout
Vertical layout mode. defers to the font's preference.
Returns: FigletLayoutMode
public FigletLayoutMode VerticalLayout { get; init; }VerticalOverflow
How to handle vertical overflow. Defaults to .
Returns: FigletVerticalOverflow
public FigletVerticalOverflow VerticalOverflow { get; init; }Remarks
FIGlet text is composed of glyphs whose height is determined by the font. The widget honors the font's preferred horizontal and vertical layout modes by default but the caller can override either axis via , , or .
To pick a font, use one of the bundled instances on (for example FigletFonts.Slant) or load a custom .flf file via .
FIGlet text is rendered monochrome — apply colors and animations by wrapping the widget in an EffectPanel, which colorizes surface cells without affecting layout.
Examples
using Hex1b;
using Hex1b.Widgets;
await using var terminal = Hex1bTerminal.CreateBuilder()
.WithHex1bApp((app, options) => ctx =>
ctx.FigletText("Hello").Font(FigletFonts.Slant))
.Build();
await terminal.RunAsync();