Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

How to create ASCII art of text using FIGlet

📅 2013-Jul-12 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ ascii art, figlet ⬩ 📚 Archive

FIGlet is a classic UNIX program that can be used to generate ASCII art or banners of input text.

Installation

Figlet can be installed from the Ubuntu repositories using the package name figlet.

Usage

To print ASCII art banner of the word Ubuntu:

$ figlet Ubuntu
 _   _ _                 _
| | | | |__  _   _ _ __ | |_ _   _
| | | | '_ \| | | | '_ \| __| | | |
| |_| | |_) | |_| | | | | |_| |_| |
 \___/|_.__/ \__,_|_| |_|\__|\__,_|

Figlet can create ASCII art using different font files. These files are typically installed in /usr/share/figlet with the file extension .flf

To use a different font file to generate ASCII art, use its name. For example, to generate ASCII art banner of the word Ubuntu using the slant.flf font file:

$ figlet -f slant Ubuntu
   __  ____                __
  / / / / /_  __  ______  / /___  __
 / / / / __ \/ / / / __ \/ __/ / / /
/ /_/ / /_/ / /_/ / / / / /_/ /_/ /
\____/_.___/\__,_/_/ /_/\__/\__,_/

Tried with: Figlet 2.2.2 and Ubuntu 12.04 LTS


© 2022 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘 @codeyarns@hachyderm.io📧