How to Create ASCII Art with FIGlet: History, Tools, and Node.js Examples
This article explains what FIGlet is, traces its development from a simple C program to modern versions, and shows multiple ways to generate ASCII art—including online tools, editor plugins, and Node.js modules—plus practical usage scenarios and code samples.
What is FIGlet
FIGlet is a utility that renders text as ASCII‑art banners. It converts ordinary strings into stylized, multi‑line representations using a collection of predefined fonts.
History
The original C program, called newban, was released in spring 1991 and later renamed FIGlet 1.0 with a single lowercase font. In 1993 the code was rewritten, adding 13 fonts and documentation, resulting in FIGlet 2.0. Subsequent releases introduced non‑ASCII support, right‑to‑left printing and other enhancements. The latest stable release is version 2.2.5, available from the official site: http://www.figlet.org/.
Generating FIGlet Art
Online Generators
Web‑based converters such as picascii.com and patorjk.com/software/taag allow you to paste text and obtain a FIGlet‑style banner without installing anything.
Editor Extensions
Popular code editors provide plugins that invoke FIGlet directly:
Sublime Text – install the “FIGlet” package.
Visual Studio Code – install the “VSC Figlet” extension and trigger it via the command palette (⌘+Shift+P) by typing “VSC Figlet”.
Atom – similar extensions are available in the package manager.
These extensions let you select a font and insert the generated banner into the current file.
Node.js Package
FIGlet is available as an npm package that provides both a library API and a command‑line interface.
Installation npm install figlet Library usage example
var figlet = require('figlet');
figlet('FIGlet Demo', function(err, data) {
if (err) {
console.error('Error:', err);
return;
}
console.log(data);
});The code prints an ASCII banner to the console.
CLI usage
npm install -g figlet-cli
figlet "Athena"The command outputs a stylized banner for the supplied word.
Browser Integration
For client‑side conversion you can include figlet.js together with a fetch polyfill.
<script src="//cdnjs.cloudflare.com/ajax/libs/fetch/1.0.0/fetch.min.js"></script>
<script src="figlet.js"></script>
<script>
figlet(inputText, 'Standard', function(err, text) {
if (err) {
console.error('Error:', err);
return;
}
console.log(text);
});
</script>Common Applications
Displaying decorative banners in Chrome DevTools console.
Separating sections in long source files within editors that support side‑by‑side views.
Adding visual flair to plain‑text emails.
Creating login or status messages in terminal sessions.
References
https://en.wikipedia.org/wiki/FIGlet
https://www.npmjs.com/package/figlet
http://patorjk.com/software/taag
https://en.wikipedia.org/wiki/ASCII_art
http://www.figlet.org/
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Aotu Lab
Aotu Lab, founded in October 2015, is a front-end engineering team serving multi-platform products. The articles in this public account are intended to share and discuss technology, reflecting only the personal views of Aotu Lab members and not the official stance of JD.com Technology.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
