Skip to content

Commit bbfa250

Browse files
committed
added figgle
1 parent f2b9ff3 commit bbfa250

17 files changed

Lines changed: 929 additions & 228 deletions

File tree

README.md

Lines changed: 106 additions & 85 deletions
Large diffs are not rendered by default.

later.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Just later
22

3-
## Latest Update : 2025-07-04 => 04 July 2025
3+
## Latest Update : 2025-07-05 => 05 July 2025
44

55

66

v2/Generator/all.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,3 +198,4 @@ Nr,Key,Source,Category
198198
197,BunnyTailServiceRegistration, https://github.com/usausa/service-registration-generator,DependencyInjection
199199
198,DimonSmart.BuilderGenerator, https://github.com/DimonSmart/BuilderGenerator,Builder
200200
199,SuperFluid, https://github.com/hughesjs/SuperFluid,StateMachine
201+
200,Figgle, https://github.com/drewnoakes/figgle,Console

v2/rscg_examples/Figgle/nuget.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
A source generator that produces ASCII banners at compile-time.
2+
3+
This package is a great choice if the strings you want to render
4+
are static (i.e. string literals). If you want to render dynamic
5+
strings, use the Figgle package directly instead. You can use both
6+
at the same time.

v2/rscg_examples/Figgle/readme.txt

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
```
2+
_____ _ _
3+
| __|_|___ ___| |___
4+
| __| | . | . | | -_|
5+
|__| |_|_ |_ |_|___|
6+
|___|___|
7+
```
8+
9+
[![Figgle Build Status](https://github.com/drewnoakes/figgle/actions/workflows/CI.yml/badge.svg)](https://github.com/drewnoakes/figgle/actions/)
10+
[![Figgle NuGet download count](https://img.shields.io/nuget/dt/Figgle)](https://www.nuget.org/packages/Figgle/)
11+
12+
## ASCII banner generation for .NET
13+
14+
```c#
15+
Console.WriteLine(
16+
FiggleFonts.Standard.Render("Hello, World!"));
17+
```
18+
19+
Produces...
20+
21+
```
22+
_ _ _ _ __ __ _ _ _
23+
| | | | ___| | | ___ \ \ / /__ _ __| | __| | |
24+
| |_| |/ _ \ | |/ _ \ \ \ /\ / / _ \| '__| |/ _` | |
25+
| _ | __/ | | (_) | \ V V / (_) | | | | (_| |_|
26+
|_| |_|\___|_|_|\___( ) \_/\_/ \___/|_| |_|\__,_(_)
27+
|/
28+
```
29+
30+
Use Figgle's source generator to embed just the fonts you want into your assembly, or—if the text to render is known ahead of time—render that text during compilation, so you don't need to ship Figgle binaries with your app.
31+
32+
## Installation
33+
34+
Figgle ships as NuGet packages that target .NET Standard 2.0, so runs almost everywhere.
35+
36+
| Project | Badges | Description |
37+
| :------ | :----- | :---------- |
38+
| [Figgle][figgle] | [![v][figgle-v]][figgle-nuget] [![dl][figgle-dl]][figgle-nuget] | The core library. Supports parsing font files and rendering text. |
39+
| [Figgle.Fonts][fonts] | [![v][fonts-v]][fonts-nuget] [![dl][fonts-dl]][fonts-nuget] | A collection of 250+ [FIGlet](http://www.figlet.org/) fonts, for use with Figgle. |
40+
| [Figgle.Generator][generator] | [![v][gen-v]][gen-nuget] [![dl][gen-dl]][gen-nuget] | A source generator to embedding fonts and render static text at compile-time. |
41+
42+
[figgle]: https://github.com/drewnoakes/figgle/tree/master/src/Figgle
43+
[fonts]: https://github.com/drewnoakes/figgle/tree/master/src/Figgle.Fonts
44+
[generator]: https://github.com/drewnoakes/figgle/tree/master/src/Figgle.Generator
45+
46+
[figgle-v]: https://img.shields.io/nuget/v/Figgle
47+
[figgle-dl]: https://img.shields.io/nuget/dt/Figgle
48+
[figgle-nuget]: https://www.nuget.org/packages/Figgle/
49+
50+
[fonts-v]: https://img.shields.io/nuget/v/Figgle.Fonts
51+
[fonts-dl]: https://img.shields.io/nuget/dt/Figgle.Fonts
52+
[fonts-nuget]: https://www.nuget.org/packages/Figgle.Fonts/
53+
54+
[gen-v]: https://img.shields.io/nuget/v/Figgle.Generator
55+
[gen-dl]: https://img.shields.io/nuget/dt/Figgle.Generator
56+
[gen-nuget]: https://www.nuget.org/packages/Figgle.Generator/
57+
58+
## Sample apps
59+
60+
If you just want to see some code (it's not that complex) check out one of the following sample projects:
61+
62+
| Sample | Description |
63+
| :----- | :---------- |
64+
| [Basics](samples/1-basics) | The easiest option, if you don't care about application size or memory use. |
65+
| [Static text generation](samples/2-static-text) | **For statically-known text**, have a source generator embed the rendered text directly into your assembly. Uses the `Figgle.Generator` package, and uses a single attribute to render the text at compile time. If all Figgle text is rendered this way, you don't have to ship any `Figgle` assembly with your app. |
66+
| [Embed font from package](samples/3-embed-font-from-package) | **For dynamic text, using a font from the `Figgle.Fonts` package** via an attribute. The font is embedded directly into your assembly. With this approach, you only need the lightweight `Figgle` package at runtime. |
67+
| [Embed font from `.flf` file](samples/4-embed-font-from-file) | **For dynamic text, using a `.flf` font file** via an attribute and `<AdditionalFiles>` project item in the `.csproj`. The font is embedded directly into your assembly. With this approach, you only need the lightweight `Figgle` package at runtime. |
68+
69+
## More output examples
70+
71+
Using `FiggleFonts.Graffiti`:
72+
73+
```
74+
___ ___ .__ .__ __ __ .__ .___._.
75+
/ | \ ____ | | | | ____ / \ / \___________| | __| _/| |
76+
/ ~ \_/ __ \| | | | / _ \ \ \/\/ / _ \_ __ \ | / __ | | |
77+
\ Y /\ ___/| |_| |_( <_> ) \ ( <_> ) | \/ |__/ /_/ | \|
78+
\___|_ / \___ >____/____/\____/ /\ \__/\ / \____/|__| |____/\____ | __
79+
\/ \/ )/ \/ \/ \/
80+
```
81+
82+
Using `FiggleFonts.ThreePoint`:
83+
84+
```
85+
|_| _ || _ \ / _ _| _||
86+
| |(/_||(_), \/\/ (_)| |(_|.
87+
```
88+
89+
Using `FiggleFonts.Ogre`:
90+
91+
```
92+
_ _ __ __ _ _ _
93+
/\ /\___| | | ___ / / /\ \ \___ _ __| | __| | / \
94+
/ /_/ / _ \ | |/ _ \ \ \/ \/ / _ \| '__| |/ _` |/ /
95+
/ __ / __/ | | (_) | \ /\ / (_) | | | | (_| /\_/
96+
\/ /_/ \___|_|_|\___( ) \/ \/ \___/|_| |_|\__,_\/
97+
|/
98+
```
99+
100+
Using `FiggleFonts.Rectangles`:
101+
102+
```
103+
__
104+
_____ _ _ _ _ _ _ _| |
105+
| | |___| | |___ | | | |___ ___| |_| | |
106+
| | -_| | | . |_ | | | | . | _| | . |__|
107+
|__|__|___|_|_|___| | |_____|___|_| |_|___|__|
108+
|_|
109+
```
110+
111+
Using `FiggleFonts.Slant`:
112+
113+
```
114+
__ __ ____ _ __ __ ____
115+
/ / / /__ / / /___ | | / /___ _____/ /___/ / /
116+
/ /_/ / _ \/ / / __ \ | | /| / / __ \/ ___/ / __ / /
117+
/ __ / __/ / / /_/ / | |/ |/ / /_/ / / / / /_/ /_/
118+
/_/ /_/\___/_/_/\____( ) |__/|__/\____/_/ /_/\__,_(_)
119+
|/
120+
```
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
2+
{
3+
"$schema": "https://aka.ms/codetour-schema",
4+
"title": "Figgle",
5+
"steps":
6+
[
7+
{
8+
"file": "FiggleDemo/FiggleDemo.csproj",
9+
"description": "First, we add Nuget [Figgle.Generator](https://www.nuget.org/packages/Figgle.Generator/) in csproj ",
10+
"pattern": "Figgle.Generator"
11+
}
12+
13+
,{
14+
"file": "FiggleDemo/Program.cs",
15+
"description": "File Program.cs \r\n>> dotnet run --project FiggleDemo/FiggleDemo.csproj ",
16+
"pattern": "this is the code"
17+
}
18+
19+
20+
,{
21+
"file": "FiggleDemo/obj/GX/Figgle.Generator/Figgle.Generator.RenderTextSourceGenerator/MyTexts.g.cs",
22+
"description": "Generated File 3 from 3 : MyTexts.g.cs ",
23+
"line": 1
24+
}
25+
26+
,{
27+
"file": "FiggleDemo/obj/GX/Figgle.Generator/Figgle.Generator.RenderTextSourceGenerator/GenerateFiggleTextAttribute.cs",
28+
"description": "Generated File 2 from 3 : GenerateFiggleTextAttribute.cs ",
29+
"line": 1
30+
}
31+
32+
,{
33+
"file": "FiggleDemo/obj/GX/Figgle.Generator/Figgle.Generator.EmbedFontSourceGenerator/EmbedFiggleFontAttribute.cs",
34+
"description": "Generated File 1 from 3 : EmbedFiggleFontAttribute.cs ",
35+
"line": 1
36+
}
37+
38+
],
39+
40+
"ref": "main"
41+
42+
}

v2/rscg_examples/Figgle/src/FiggleDemo/FiggleDemo.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,9 @@
1010
<ItemGroup>
1111
<PackageReference Include="Figgle.Generator" Version="0.6.4" PrivateAssets="all" />
1212
</ItemGroup>
13+
<PropertyGroup>
14+
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
15+
<CompilerGeneratedFilesOutputPath>$(BaseIntermediateOutputPath)\GX</CompilerGeneratedFilesOutputPath>
16+
</PropertyGroup>
1317

1418
</Project>

v2/rscg_examples/Figgle/video.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"scriptName": "Figgle",
3+
"steps":
4+
[
5+
{"typeStep":"exec","arg":"clipchamp.exe launch"},
6+
{"typeStep":"text","arg": "Welcome to Roslyn Examples"},
7+
{"typeStep":"text","arg":"If you want to see more examples , see List Of RSCG"},
8+
{"typeStep":"browser","arg":"https://ignatandrei.github.io/RSCG_Examples/v2/docs/List-of-RSCG"},
9+
{"typeStep":"text","arg": "My name is Andrei Ignat and I am deeply fond of Roslyn Source Code Generator. "},
10+
11+
{"typeStep":"text","arg": "Today I will present Figgle.Generator . Generating ASCII art text for console applications ."},
12+
{"typeStep":"browser","arg":"https://www.nuget.org/packages/Figgle.Generator/"},
13+
{"typeStep":"text","arg": "The whole example is here"},
14+
{"typeStep":"browser","arg":"https://ignatandrei.github.io/RSCG_Examples/v2/docs/Figgle"},
15+
{"typeStep":"text","arg": "You can download the code from here"},
16+
{"typeStep":"browser","arg":"https://ignatandrei.github.io/RSCG_Examples/v2/docs/Figgle#download-example-net--c-"},
17+
{"typeStep":"text","arg":"Here is the code downloaded "},
18+
{"typeStep":"exec","arg":"explorer.exe /select,D:\\gth\\RSCG_Examples\\v2\\rscg_examples\\Figgle\\src\\FiggleDemo.sln"},
19+
{"typeStep":"text","arg": "So , let's start the project with Visual Studio Code "},
20+
{"typeStep":"stepvscode","arg": "-n D:\\gth\\RSCG_Examples\\v2\\rscg_examples\\Figgle\\src"},
21+
22+
{"typeStep":"text","arg": "To use it ,you will put the Nuget Figgle.Generator into the csproj "},
23+
24+
{"typeStep":"stepvscode","arg": "-r -g D:\\gth\\RSCG_Examples\\v2\\rscg_examples\\Figgle\\src\\FiggleDemo\\FiggleDemo.csproj"},
25+
26+
{"typeStep":"text","arg": "And now I will show you an example of using Figgle.Generator"},
27+
28+
{"typeStep":"hide","arg": "now execute the tour in VSCode"},
29+
{"typeStep":"tour", "arg": "src/.tours/"},
30+
{"typeStep":"text","arg":" And I will execute the project"},
31+
{"typeStep":"showproj", "arg":"FiggleDemo.csproj"},
32+
{"typeStep":"text","arg":" This concludes the project"},
33+
{"typeStep":"waitseconds","arg":"30"},
34+
{"typeStep":"text","arg": "Remember, you can download the code from here"},
35+
{"typeStep":"browser","arg":"https://ignatandrei.github.io/RSCG_Examples/v2/docs/Figgle#download-example-net--c-",
36+
SpeakTest=" "},
37+
{"typeStep":"waitseconds","arg":"30"},
38+
]
39+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<h1>Console</h1>
2+
3+
Number RSCG: 1
4+
5+
1 [Figgle](/docs/Figgle)
6+

0 commit comments

Comments
 (0)