mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-04-16 08:52:50 +08:00
Add initial FIGlet docs
This commit is contained in:
parent
a59e0dcb21
commit
a5125d640c
33
docs/input/figlet.md
Normal file
33
docs/input/figlet.md
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
Title: Figlet
|
||||||
|
Order: 5
|
||||||
|
---
|
||||||
|
|
||||||
|
Spectre.Console can render [FIGlet](http://www.figlet.org/) text by using the `FigletText` class.
|
||||||
|
|
||||||
|
# Default font
|
||||||
|
|
||||||
|
```csharp
|
||||||
|
AnsiConsole.Render(
|
||||||
|
new FigletText("Hello")
|
||||||
|
.LeftAligned()
|
||||||
|
.Color(Color.Red));
|
||||||
|
```
|
||||||
|
|
||||||
|
```text
|
||||||
|
_ _ _ _
|
||||||
|
| | | | ___ | | | | ___
|
||||||
|
| |_| | / _ \ | | | | / _ \
|
||||||
|
| _ | | __/ | | | | | (_) |
|
||||||
|
|_| |_| \___| |_| |_| \___/
|
||||||
|
```
|
||||||
|
|
||||||
|
# Custom font
|
||||||
|
|
||||||
|
```csharp
|
||||||
|
var font = FigletFont.Load("starwars.flf");
|
||||||
|
|
||||||
|
AnsiConsole.Render(
|
||||||
|
new FigletText(font, "Hello")
|
||||||
|
.LeftAligned()
|
||||||
|
.Color(Color.Red));
|
||||||
|
```
|
Loading…
x
Reference in New Issue
Block a user