From a5125d640c5e9c26966d9ab720a22182d18056aa Mon Sep 17 00:00:00 2001 From: Patrik Svensson Date: Sun, 22 Nov 2020 03:21:10 +0100 Subject: [PATCH] Add initial FIGlet docs --- docs/input/figlet.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 docs/input/figlet.md diff --git a/docs/input/figlet.md b/docs/input/figlet.md new file mode 100644 index 0000000..ca340ef --- /dev/null +++ b/docs/input/figlet.md @@ -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)); +``` \ No newline at end of file