Aptivi - Manual
ProjectsWebsiteBlog
Textify - Manual
Textify - Manual
  • Welcome
  • Breaking changes
  • Usage
    • How to use
      • Basic Features
        • Text Manipulation
        • Other Tools
      • Extra Features
        • Space Analysis and Correction
        • Unicode Analysis
        • Semantic Versioning
        • Name Generation
        • Word Management
        • Accessibility Tools
        • Figlet Text
        • Emoji Management
        • Wide Characters
    • How it works
      • Space Analyzer Internals
      • Unicode Analyzer Internals
      • Semantic Versioning Internals
      • Name Generation Internals
      • Word Selection Internals
      • Figlet Text Internals
  • Report an issue
  • Source code
  • API Reference
Powered by GitBook
On this page
  • How do you write Figlet text to the console?
  • Other ways
Edit on GitHub
  1. Usage
  2. How to use
  3. Extra Features

Figlet Text

Figlet text makes your text look more awesome!

As part of the main Textify library, you can write figlet text using one of the 550+ fonts provided with the library!

How do you write Figlet text to the console?

This feature is easy to use. Just call the Console.WriteLine() function with FigletTools.RenderFiglet(), passing the text and the figlet font name (case sensitive):

string figletText = FigletTools.RenderFiglet("Hello!", "banner");
Console.WriteLine(figletText);

Additionally, you can get the Figlet font instance using one of the following FigletFonts functions, passing the font name (lowercase) to the first argument:

  • GetByName()

  • TryGetByName()

After you get the instance, you can call the Render() function on it, passing the text as the first argument.

var fontInstance = FigletizeFonts.TryGetByName(fontName);
if (fontInstance is null)
{
    Console.Error.WriteLine($"Font {fontName} not found. Exiting...");
    return;
}
string rendered = fontInstance.Render(message);
Console.WriteLine(rendered);

Other ways

Additionally, you can use the FigletTools class to get a list of supported Figlet fonts and their instances using the GetFigletFonts() function.

GetFigletFont() also does the same as GetByName(), except that it uses the fallback font, small, when the font is not found.

Last updated 7 months ago