Skip to content

Commit 84a5633

Browse files
committed
Add FigletFont.GetPredefineFonts()
1 parent df2e4a4 commit 84a5633

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

src/XenoAtom.Terminal.UI/Figlet/FigletFont.cs

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,38 @@ public static FigletFont CreateBlockFont(int height = 4, int width = 4)
135135
/// </summary>
136136
public static FigletFont Block => FigletFontBlockHolder.Instance;
137137

138+
/// <summary>
139+
/// Retrieves a list of predefined Figlet fonts available for use.
140+
/// </summary>
141+
/// <returns>A list of <see cref="FigletFont"/> objects representing the predefined fonts. The list will be empty if no
142+
/// predefined fonts are available.</returns>
143+
public static List<FigletFont> GetPredefinedFonts() =>
144+
[
145+
Banner3D,
146+
Big,
147+
Block,
148+
Bubble,
149+
BulbHead,
150+
CyberLarge,
151+
CyberMedium,
152+
Digital,
153+
Doh,
154+
Doom,
155+
DotMatrix,
156+
Isometric1,
157+
Isometric2,
158+
Isometric3,
159+
Lcd,
160+
Ogre,
161+
Shadow,
162+
Slant,
163+
Small,
164+
Smslant,
165+
Standard,
166+
ThreeD,
167+
ThreeXFive
168+
];
169+
138170
// NativeAOT lazy initialization pattern
139171
private static class FigletFontBlockHolder
140172
{

0 commit comments

Comments
 (0)