ascii-art-font-updated

1.0.0 • Public • Published
                   _  _                       _
                  (_)(_)                     | |
  __ _  ___   ___  _  _  ______   __ _  _ __ | |_
 / _` |/ __| / __|| || ||______| / _` || '__|| __|
| (_| |\__ \| (__ | || |        | (_| || |   | |_
 \__,_||___/ \___||_||_|         \__,_||_|    \__|

ascii-art-font.js

NPM version npm Travis

This module handles the installation, rendering and management of figlet fonts.

Figlet fonts are an ASCII art font standard, widely used for terminal output.

It looks something like this:

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

Installation

npm install ascii-art-font-updated

Usage

require('ascii-art-font')

To do anything with it, you'll need to include the library:

const Font = require('ascii-art-font');

Font.create(text, styles, handler)

Map through an ansi string one character at a time, without any of those characters being styles.

Kind: static property of ascii-art-font

Param Type Description
text string the string to render in block form
styles string the styles to apply to all lines
callback function(err, result) the callback

Example

To set the directory of the fonts:

    Font.fontPath = 'Fonts';

Then to render some text:

    Font.create('my text', 'Doom', function(rendered){
        //do stuff here
    });

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i ascii-art-font-updated

      Weekly Downloads

      0

      Version

      1.0.0

      License

      MIT

      Unpacked Size

      4.07 MB

      Total Files

      382

      Last publish

      Collaborators

      • riskyshot69