mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-04-25 20:52:50 +08:00
32 lines
627 B
Markdown
32 lines
627 B
Markdown
Title: Figlet
|
|
Order: 50
|
|
RedirectFrom: figlet
|
|
Description: "*Spectre.Console* can render FIGlet text by using the **FigletText** class."
|
|
Reference: T:Spectre.Console.FigletText
|
|
---
|
|
|
|
Spectre.Console can render [FIGlet](http://www.figlet.org/) text by using the `FigletText` class.
|
|
|
|
## Default font
|
|
|
|
```csharp
|
|
AnsiConsole.Write(
|
|
new FigletText("Hello")
|
|
.LeftJustified()
|
|
.Color(Color.Red));
|
|
```
|
|
|
|
<?# AsciiCast cast="figlet" /?>
|
|
|
|
|
|
## Custom font
|
|
|
|
```csharp
|
|
var font = FigletFont.Load("starwars.flf");
|
|
|
|
AnsiConsole.Write(
|
|
new FigletText(font, "Hello")
|
|
.LeftJustified()
|
|
.Color(Color.Red));
|
|
```
|