Figlet: Show text in ascii art

January 17, 2011 at 2:06 pm (console based, linux apps) (, , , , )

Mmmmm…….. it’s me after a long time writing on this blog. I’ve almost forgotten that there was a blog of mine just waiting to be refreshed by it’s author. Within the last year i changed my PC and the operating system twice, and now using the Fedora 14 x86/64 edition. So I guess we should start from some ascii arts on the terminal to show up whenever it’s started. This type art is familar to the Linux Mint users who will see an animal saying something in ascii art upon start of each terminal. However, it requires use of multiple commands. This post is part one.

Figlet – print a text as a logo http://www.figlet.org

Happy new year on figlet version 2.22

How to install – figlet is not provided with most of the Linux distributions, and it’s not included in their package hosting servers. Hence using yum or apt-get simply may not work. If that’s the case, we need to compile it from the source. You can download the source from here. Decompress it and change in to it’s directory in the terminal and type;

make

to compile figlet. For further information on compiling from source, see my article. Unfortunately, there’s no make install here so we need to change in to figlet directory always to use the command (you can copy the binaries and man pages in to correct directories but this is complex).

cd <path to figlet folder>/figlet222/

./figlet <the text you want to show as a logo>

figlet features

I’ ll be mentioning only the important ones here.

Change style/font : A sub directory called fonts holds some .flf files which contains style info.

./figlet -f <fontfile_name> text

ex: ./figlet -f script Happy new year will produce something like above picture.

change alignment : To center -c , -l for left and -r for right

change right to left: -R

layout: -t will fit the text to terminal width, -P paragraph mode

figlet using some tweaks above

There’s a lot more; see figlet man page for more details. http://www.figlet.org/figlet-man.html

Part 2 of the post is about using cowsay and fortune-mod. Will be followed soon.

Advertisements

Permalink Leave a Comment