Skip to content

drewnoakes/figgle

Repository files navigation

 _____ _         _     
|   __|_|___ ___| |___ 
|   __| | . | . | | -_|
|__|  |_|_  |_  |_|___|
        |___|___|      

Figgle Build Status Figgle NuGet download count

ASCII banner generation for .NET

Console.WriteLine(
    FiggleFonts.Standard.Render("Hello, World!"));

Produces...

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

Use Figgle's source generator to embed just the fonts you want into your assembly, or—if the text to render is known ahead of time—render that text during compilation, so you don't need to ship Figgle binaries with your app.

Installation

Figgle ships as NuGet packages that target .NET Standard 2.0, so runs almost everywhere.

Project Badges Description
Figgle v dl The core library. Supports parsing font files and rendering text.
Figgle.Fonts v dl A collection of 250+ FIGlet fonts, for use with Figgle.
Figgle.Generator v dl A source generator to embedding fonts and render static text at compile-time.

Sample apps

If you just want to see some code (it's not that complex) check out one of the following sample projects:

Sample Description
Basics The easiest option, if you don't care about application size or memory use.
Static text generation For statically-known text, have a source generator embed the rendered text directly into your assembly. Uses the Figgle.Generator package, and uses a single attribute to render the text at compile time. If all Figgle text is rendered this way, you don't have to ship any Figgle assembly with your app.
Embed font from package For dynamic text, using a font from the Figgle.Fonts package via an attribute. The font is embedded directly into your assembly. With this approach, you only need the lightweight Figgle package at runtime.
Embed font from .flf file For dynamic text, using a .flf font file via an attribute and <AdditionalFiles> project item in the .csproj. The font is embedded directly into your assembly. With this approach, you only need the lightweight Figgle package at runtime.

More output examples

Using FiggleFonts.Graffiti:

  ___ ___         .__  .__               __      __            .__       .___._.
 /   |   \   ____ |  | |  |   ____      /  \    /  \___________|  |    __| _/| |
/    ~    \_/ __ \|  | |  |  /  _ \     \   \/\/   /  _ \_  __ \  |   / __ | | |
\    Y    /\  ___/|  |_|  |_(  <_> )     \        (  <_> )  | \/  |__/ /_/ |  \|
 \___|_  /  \___  >____/____/\____/  /\   \__/\  / \____/|__|  |____/\____ |  __
       \/       \/                   )/        \/                         \/  \/

Using FiggleFonts.ThreePoint:

|_| _ || _    \    / _  _| _||
| |(/_||(_),   \/\/ (_)| |(_|.

Using FiggleFonts.Ogre:

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

Using FiggleFonts.Rectangles:

                                            __ 
 _____     _ _          _ _ _         _   _|  |
|  |  |___| | |___     | | | |___ ___| |_| |  |
|     | -_| | | . |_   | | | | . |  _| | . |__|
|__|__|___|_|_|___| |  |_____|___|_| |_|___|__|
                  |_|                          

Using FiggleFonts.Slant:

    __  __     ____           _       __           __    ____
   / / / /__  / / /___       | |     / /___  _____/ /___/ / /
  / /_/ / _ \/ / / __ \      | | /| / / __ \/ ___/ / __  / / 
 / __  /  __/ / / /_/ /      | |/ |/ / /_/ / /  / / /_/ /_/  
/_/ /_/\___/_/_/\____( )     |__/|__/\____/_/  /_/\__,_(_)   
                     |/                                      

About

ASCII banner generation for .NET

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 5

Languages