FIGLet 2.0.12

dotnet add package FIGLet --version 2.0.12
                    
NuGet\Install-Package FIGLet -Version 2.0.12
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="FIGLet" Version="2.0.12" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FIGLet" Version="2.0.12" />
                    
Directory.Packages.props
<PackageReference Include="FIGLet" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add FIGLet --version 2.0.12
                    
#r "nuget: FIGLet, 2.0.12"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package FIGLet@2.0.12
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=FIGLet&version=2.0.12
                    
Install as a Cake Addin
#tool nuget:?package=FIGLet&version=2.0.12
                    
Install as a Cake Tool

🌐 BYTEFORGE FIGLET SUITE β€” FIGLET .NET LIBRARY

β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•—   β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β•šβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β•β•šβ•β•β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β•β• β–ˆβ–ˆβ•”β•β•β•β•β•
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•    β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—  β•šβ–ˆβ–ˆβ•”β•     β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•”β•β•β•  β–ˆβ–ˆβ•”β•β•β•  β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•   β–ˆβ–ˆβ•‘      β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘     β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
β•šβ•β•β•β•β•β•    β•šβ•β•      β•šβ•β•   β•šβ•β•β•β•β•β•β•β•šβ•β•      β•šβ•β•β•β•β•β• β•šβ•β•  β•šβ•β• β•šβ•β•β•β•β•β• β•šβ•β•β•β•β•β•β•
                 β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•—     β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—    β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•—   β–ˆβ–ˆβ•—β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
                 β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β• β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•”β•β•β•β•β•β•šβ•β•β–ˆβ–ˆβ•”β•β•β•    β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β•šβ•β•β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•”β•β•β•β•β•
                 β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—     β–ˆβ–ˆβ•‘       β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
                 β–ˆβ–ˆβ•”β•β•β•  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•”β•β•β•     β–ˆβ–ˆβ•‘       β•šβ•β•β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•”β•β•β•
                 β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—   β–ˆβ–ˆβ•‘       β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
                 β•šβ•β•     β•šβ•β• β•šβ•β•β•β•β•β• β•šβ•β•β•β•β•β•β•β•šβ•β•β•β•β•β•β•   β•šβ•β•       β•šβ•β•β•β•β•β•β• β•šβ•β•β•β•β•β• β•šβ•β•   β•šβ•β•   β•šβ•β•β•β•β•β•β•

ByteForge.FIGLet A fast, spec‑compliant FIGLet engine for .NET.

πŸ“˜ Overview

ByteForge.FIGLet is the C# / .NET implementation of the FIGLet rendering engine at the heart of the ByteForge FIGLet Suite.

It provides a robust and efficient implementation of the FIGLet specification, allowing you to create ASCII art from text using FIGLet fonts. It supports all standard FIGLet features including various smushing rules, layout modes, ANSI color preservation, and Unicode.

This library powers:

  • The Visual Studio FIGLet Comment Generator extension
  • The FIGPrint CLI
  • Any .NET application that needs FIGLet rendering

✨ Features

  • πŸ”€ Render FIGLet text using any .flf font
  • πŸ“„ Full FIGLet font (.flf) file parsing and loading
  • πŸ—œοΈ Automatic handling of compressed/zipped font files
  • 🎨 ANSI color support for terminal output
  • 🌏 Unicode support including surrogate pairs
  • πŸ“ Paragraph formatting support
  • βš™οΈ Supports Full Size, Kerning, and Smushing layout modes
  • 🧠 Implements all official smushing rules
  • πŸ“¦ Default embedded font included β€” works out of the box
  • πŸš€ No external dependencies, fast and lightweight
  • 🧱 Multi-target: .NET Framework 4.7.2 through .NET 10.0

Sample Output

  _  _     _ _          _        _       _    _ _
 | || |___| | |___      \ \    / /__ _ _| |__| | |
 | __ / -_) | / _ \_     \ \/\/ / _ \ '_| / _` |_|
 |_||_\___|_|_\___( )     \_/\_/\___/_| |_\__,_(_)
                  |/

πŸ›  Installation

Install via NuGet:

dotnet add package FIGLet

Or via the NuGet Package Manager UI β€” search for FIGLet.

πŸš€ Quick Start

Basic Usage

using ByteForge.FIGLet;

// Load a font from a file (returns null if the file is not found)
var font = FIGFont.FromFile("standard.flf") ?? throw new FileNotFoundException("Font not found");

// Create a renderer
var renderer = new FIGLetRenderer(font);

// Render text
string asciiArt = renderer.Render("Hello, World!");
Console.WriteLine(asciiArt);

Using the Default Font

The library ships with a built-in default font β€” no file required:

using ByteForge.FIGLet;

var renderer = new FIGLetRenderer(FIGFont.Default);
Console.WriteLine(renderer.Render("Hello, World!"));

Static Rendering

For one-shot rendering without creating a renderer instance:

using ByteForge.FIGLet;

string asciiArt = FIGLetRenderer.Render("Hello, World!");
Console.WriteLine(asciiArt);

βš™οΈ Layout Modes

The library supports three layout modes:

Mode Value Description
LayoutMode.FullSize -1 No character compression β€” each character is rendered at full width
LayoutMode.Kerning 0 Characters are moved together until they touch but do not overlap
LayoutMode.Smushing 1 Characters are merged according to the font's smushing rules (default)
using ByteForge.FIGLet;

var font = FIGFont.Default;

string fullSize = FIGLetRenderer.Render("Text", font, LayoutMode.FullSize);
string kerning  = FIGLetRenderer.Render("Text", font, LayoutMode.Kerning);
string smushing = FIGLetRenderer.Render("Text", font, LayoutMode.Smushing);

🧩 Smushing Rules

The library implements all official FIGLet smushing rules as defined in the FIGLet specification. The font file determines which rules are active.

Rule Flag Description
Equal Character 1 Two identical characters smush into one
Underscore 2 Underscore is replaced by a character from the hierarchy
Hierarchy 4 Characters from "higher" classes replace those from "lower" ones
Opposite Pair 8 Matching bracket/parenthesis pairs smush into a vertical bar
Big X 16 \ and / smush into X; > and < smush into =
Hardblank 32 Two hardblanks smush into one hardblank

You can inspect a font's active rules at runtime:

using ByteForge.FIGLet;

// FromFile returns null if the file is not found
var font = FIGFont.FromFile("standard.flf") ?? throw new FileNotFoundException("Font not found");

bool hasEqualCharRule  = font.HasSmushingRule(SmushingRules.EqualCharacter);
bool hasUnderscoreRule = font.HasSmushingRule(SmushingRules.Underscore);

πŸ“ Font Support

  • Standard .flf font files
  • Compressed .flf files inside .zip archives (auto-detected via FIGFontStream)

🎨 ANSI Color Support

The library preserves ANSI color codes through the rendering process, allowing you to create colorful FIGLet text in terminals:

using ByteForge.FIGLet;

var renderer = new FIGLetRenderer(
    FIGFont.Default,
    useANSIColors: true
);

string colorfulText = "\x1b[31mRed\x1b[0m \x1b[32mGreen\x1b[0m \x1b[34mBlue\x1b[0m";
Console.WriteLine(renderer.Render(colorfulText));

πŸ“ Paragraph Mode

When enabled (the default), blank lines in the input produce separate FIGLet renderings spaced by the font's character height:

using ByteForge.FIGLet;

var renderer = new FIGLetRenderer(FIGFont.Default);

string paragraphs = "Paragraph 1\n\nParagraph 2";
Console.WriteLine(renderer.Render(paragraphs));

Output:

  ___                                  _        _ 
 | _ \__ _ _ _ __ _ __ _ _ _ __ _ _ __| |_     / |
 |  _/ _` | '_/ _` / _` | '_/ _` | '_ \ ' \    | |
 |_| \__,_|_| \__,_\__, |_| \__,_| .__/_||_|   |_|
                   |___/         |_|              





  ___                                  _        ___ 
 | _ \__ _ _ _ __ _ __ _ _ _ __ _ _ __| |_     |_  )
 |  _/ _` | '_/ _` / _` | '_/ _` | '_ \ ' \     / / 
 |_| \__,_|_| \__,_\__, |_| \__,_| .__/_||_|   /___|
                   |___/         |_|                

🌏 Unicode Support

The library fully supports Unicode characters including surrogate pairs. Characters not present in the font are skipped gracefully:

using ByteForge.FIGLet;

var renderer = new FIGLetRenderer(FIGFont.Default);
Console.WriteLine(renderer.Render("Hello 😊 World!"));

Output:

  _  _     _ _          __      __       _    _ _ 
 | || |___| | |___      \ \    / /__ _ _| |__| | |
 | __ / -_) | / _ \      \ \/\/ / _ \ '_| / _` |_|
 |_||_\___|_|_\___/       \_/\_/\___/_| |_\__,_(_)

πŸ“– API Reference

FIGFont

Handles font loading and storage.

Member Description
FIGFont.Default Returns the built-in default font (lazy-loaded, cached)
FIGFont.FromFile(path) Loads a font from a .flf or .zip file
FIGFont.FromStream(stream) Loads a font from a Stream
FIGFont.FromReader(reader) Loads a font from a TextReader
FIGFont.FromArray(lines) Parses a font from a string[]
.Height Character height in rows
.HardBlank The hard-blank character
.Characters Dictionary mapping character code point β†’ glyph rows
.SmushingRules Active smushing rules flags
.PrintDirection 0 = left-to-right, 1 = right-to-left
.HasSmushingRule(rule) Tests whether a specific rule is active

FIGLetRenderer

Core rendering engine.

Member Description
new FIGLetRenderer(font, mode?, separator?, useANSIColors?, paragraphMode?) Create an instance
FIGLetRenderer.Render(text, font?, mode?, separator?, useANSIColors?, paragraphMode?) Static one-shot render
.Render(text) Render text using instance settings
.LayoutMode Active LayoutMode
.LineSeparator Line separator string (default: platform line separator)
.UseANSIColors Whether to preserve ANSI color codes through rendering
.ParagraphMode Whether blank lines produce separate FIGLet renders

LayoutMode

enum LayoutMode
{
    FullSize = -1,   // No character compression
    Kerning  =  0,   // Minimal spacing
    Smushing =  1,   // Full character overlap (default)
    Default  =  1,
}

SmushingRules

[Flags]
enum SmushingRules
{
    None           =  0,
    EqualCharacter =  1,
    Underscore     =  2,
    Hierarchy      =  4,
    OppositePair   =  8,
    BigX           = 16,
    HardBlank      = 32,
}

πŸ— Implementation Details

  1. FIGFont β€” Parses .flf font files; supports loading from files, streams, readers, or string arrays; handles ZIP-compressed font files via FIGFontStream; manages smushing rule configuration.

  2. FIGLetRenderer β€” Converts input text to FIGLet output; implements character smushing logic; handles different layout modes; processes ANSI color codes in a single pre-pass; supports paragraph formatting and RTL fonts.

  3. LayoutMode β€” Enumeration controlling how characters are combined during rendering.

  4. SmushingRules β€” Flags enumeration defining which character-combining rules are active.

⚑ Performance Considerations

  • Default font is lazy-loaded once and cached for the application lifetime
  • ANSI color codes are handled in a single pre-pass, not during rendering
  • Surrogate pairs are supported without performance degradation
  • Efficient string building throughout the rendering pipeline

πŸ”§ Used By

This library powers:

  • Visual Studio FIGLet Comment Generator extension
  • FIGPrint CLI tool
  • Any .NET application that needs ASCII art banners

🀝 Contributing

Contributions are welcome! To contribute:

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Open a Pull Request

πŸ“œ License

This library is licensed under the MIT License β€” see the LICENSE file for details.

πŸ’‘ Credits

  • Original FIGLet concept by Frank, Ian & Glenn
  • Implementations by Paulo Santos (ByteForge)
  • FIGLet specification: figlet.org

Support

If you encounter any issues or have feature requests, please:

  1. Search existing issues
  2. Create a new issue if needed

Made with ❀️ by Paulo Santos

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 is compatible. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 is compatible.  net48 is compatible.  net481 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETCoreApp 3.1

    • No dependencies.
  • .NETFramework 4.7.2

    • No dependencies.
  • .NETFramework 4.8

    • No dependencies.
  • .NETFramework 4.8.1

    • No dependencies.
  • .NETStandard 2.0

    • No dependencies.
  • .NETStandard 2.1

    • No dependencies.
  • net10.0

    • No dependencies.
  • net5.0

    • No dependencies.
  • net6.0

    • No dependencies.
  • net7.0

    • No dependencies.
  • net8.0

    • No dependencies.
  • net9.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.12 41 4/5/2026
2.0.11 40 4/5/2026
2.0.10 48 4/4/2026
2.0.8 43 4/4/2026
2.0.0 55 4/1/2026
1.1.0 818 5/1/2025
1.0.1 209 4/6/2025
1.0.0 196 4/6/2025