Skip to content

FigletText

IFigletText renders a string in oversized ASCII-art letters - the classic FIGlet effect, suitable for splash screens, banners, and big "DONE!" moments.

When to use

  • Boot banners and CLI splash screens.
  • Section headers in interactive tools.
  • Anywhere a regular Markup line is too understated.

Basic usage

pascal
AnsiConsole.Write(
  Widgets.FigletText('Hello Delphi')
    .WithColor(TAnsiColor.Aqua)
    .WithAlignment(TAlignment.Left));

That renders something like:

 _   _      _ _         ____       _       _     _
| | | | ___| | | ___   |  _ \  ___| |_ __ | |__ (_)
| |_| |/ _ \ | |/ _ \  | | | |/ _ \ | '_ \| '_ \| |
|  _  |  __/ | | (_) | | |_| |  __/ | |_) | | | | |
|_| |_|\___|_|_|\___/  |____/ \___|_| .__/|_| |_|_|
                                    |_|

Configuration

MethodPurpose
WithColor(color)Foreground colour for the rendered glyphs.
WithAlignment(value)Horizontal alignment within the available width.
WithFont(font)Use a different FIGlet font (a TFigletFont value).

The default font is "Standard" (the classic FIGlet face). The library ships the Standard font built-in; loading custom .flf fonts is possible via the TFigletFont API.

API reference

See also

Released under the MIT License.