Chizl.ConsoleFonts 6.2.19.1

dotnet add package Chizl.ConsoleFonts --version 6.2.19.1
                    
NuGet\Install-Package Chizl.ConsoleFonts -Version 6.2.19.1
                    
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="Chizl.ConsoleFonts" Version="6.2.19.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Chizl.ConsoleFonts" Version="6.2.19.1" />
                    
Directory.Packages.props
<PackageReference Include="Chizl.ConsoleFonts" />
                    
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 Chizl.ConsoleFonts --version 6.2.19.1
                    
#r "nuget: Chizl.ConsoleFonts, 6.2.19.1"
                    
#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 Chizl.ConsoleFonts@6.2.19.1
                    
#: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=Chizl.ConsoleFonts&version=6.2.19.1
                    
Install as a Cake Addin
#tool nuget:?package=Chizl.ConsoleFonts&version=6.2.19.1
                    
Install as a Cake Tool

Chizl.ConsoleFonts

NuGet Version License .NET

A lightweight, cross-platform .NET library for adding font styles to console applications using ANSI escape sequences.


example


📦 Installation

NuGet Package Manager

Install-Package Chizl.ConsoleFonts

.NET CLI

dotnet add package Chizl.ConsoleFonts

PackageReference

<PackageReference Include="Chizl.ConsoleFonts" />

Note: Omitting the version attribute automatically uses the latest stable release. To pin a specific version, use Version="x.x.x".


🎯 Features

  • ✅ Simple, fluent API for console text styling
  • ✅ Multiple font styles: Bold, Italics, <u>Underline</u>, Strike, Blink, and more
  • ✅ Cross-platform support (.NET Standard 2.0/2.1)
  • ✅ Zero dependencies
  • ✅ Lightweight and performant
  • ✅ Works with modern terminals that support ANSI escape sequences

📖 Available Styles

Style Description Usage Example
Bold Makes text bold {FontStyles.Bold}text{FontStyles.Reset}
Disabled Darkens text from existing color {FontStyles.Disabled}text{FontStyles.Reset}
Italics Makes text italic {FontStyles.Italics}text{FontStyles.Reset}
Underline Adds single underline {FontStyles.Underline}text{FontStyles.Reset}
DOUBLE_UNDERLINE Adds double underline {FontStyles.DOUBLE_UNDERLINE}text{FontStyles.Reset}
Blink Makes text blink {FontStyles.Blink}text{FontStyles.Reset}
Invert Swaps foreground/background colors {FontStyles.Invert}text{FontStyles.Reset}
Invisible Hides text (same as background) {FontStyles.Invisible}text{FontStyles.Reset}
Strike Adds strikethrough {FontStyles.Strike}text{FontStyles.Reset}
Reset Resets all styles {FontStyles.Reset}

💡 Usage Examples

Basic Styling

Console.WriteLine($"This is my {FontStyles.Underline}UNDERLINE{FontStyles.Reset} text.");

Multiple Styles

Console.WriteLine($"This is my {FontStyles.Bold}{FontStyles.Italics}BOLD ITALICS{FontStyles.Reset} text.");
Console.WriteLine($"This is my {FontStyles.Underline}{FontStyles.Blink}UNDERLINE BLINK{FontStyles.Reset} text.");

Hiding Sensitive Information

// Good for logging without displaying sensitive data in console 
Console.WriteLine($"Password: {FontStyles.Invisible}secret123{FontStyles.Reset}");

🛠️ Properties

Each FontStyles instance provides the following properties:

  • Name - Returns the name of the style (e.g., "BOLD", "UNDERLINE")
  • Value - Returns the ANSI escape sequence string
  • NumberValue - Returns the numeric ANSI escape value
var style = FontStyles.Bold; 
Console.WriteLine($"Name: {style.Name}");
// "BOLD" 
Console.WriteLine($"Value: {style.Value}");
// "\x1b[1m" 
Console.WriteLine($"Number: {style.NumberValue}"); // 1

⚙️ Requirements

  • .NET Standard 2.0 or higher
  • Terminal/console with ANSI escape sequence support
    • Windows Terminal ✅
    • PowerShell 7+ ✅
    • Linux/macOS terminals ✅
    • Legacy Windows Command Prompt (limited support)

⚠️ Important Notes

  1. Always use FontStyles.Reset after applying styles to avoid style bleeding into subsequent text
  2. Bold appearance depends on your terminal's font settings
  3. Blink support varies by terminal (many modern terminals disable blinking)
  4. Set Console.OutputEncoding = Encoding.UTF8; for best compatibility

📄 License

This project is licensed under the MIT License - see the LICENSE.md file for details.



🤝 Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page.


Made with experience by Chizl

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  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 was computed.  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 was computed.  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 was computed.  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 was computed.  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 was computed. 
.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 was computed.  net48 was computed.  net481 was computed. 
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.
  • .NETStandard 2.0

    • No dependencies.
  • .NETStandard 2.1

    • 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
6.2.19.1 188 2/19/2026
6.2.18.1 127 2/19/2026