Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Producing ascii art via C#

Tags:

c#

ascii-art

I once did a programming test for a job, which involved producing ASCii art in C#. I didn't really do well at this, as I had little idea or experience of doing this in C# (or in any programming knowledge).

Are there any resources or classes in .NET that would be worth knowing/practising on?

like image 542
GurdeepS Avatar asked Aug 08 '10 21:08

GurdeepS


People also ask

What is keyboard character art called?

Text art, also called ASCII art or keyboard art is a copy-pasteable digital age art form. It's about making text pictures with text symbols.


1 Answers

ASCII art is pretty general, but if you want to produce an ASCII banner or heading then I've ported the popular FIGlet font generation to .NET:

https://github.com/drewnoakes/figgle

It's very easy to use, and available on NuGet for almost every version of .NET (netstandard1.3 and above, so .NET Framework as well as .NET Core, Xamarin, etc...).

            _ _          __    __           _     _   _ 
  /\  /\___| | | ___    / / /\ \ \___  _ __| | __| | / \
 / /_/ / _ \ | |/ _ \   \ \/  \/ / _ \| '__| |/ _` |/  /
/ __  /  __/ | | (_) |   \  /\  / (_) | |  | | (_| /\_/ 
\/ /_/ \___|_|_|\___( )   \/  \/ \___/|_|  |_|\__,_\/   
                    |/       

Produced via:

Console.WriteLine( 
    FiggleFonts.Ogre.Render("Hello, World!"));
like image 173
Drew Noakes Avatar answered Sep 30 '22 08:09

Drew Noakes