JavaScript parser for FIGlet fonts

Related tags

Utilities figlet-js
Overview
 _______ _________ _______  _        _______ _________       _________ _______ 
(  ____ \\__   __/(  ____ \( \      (  ____ \\__   __/       \__    _/(  ____ \
| (    \/   ) (   | (    \/| (      | (    \/   ) (             )  (  | (    \/
| (__       | |   | |      | |      | (__       | |    _____    |  |  | (_____ 
|  __)      | |   | | ____ | |      |  __)      | |   (_____)   |  |  (_____  )
| (         | |   | | \_  )| |      | (         | |             |  |        ) |
| )      ___) (___| (___) || (____/\| (____/\   | |          |\_)  )  /\____) |
|/       \_______/(_______)(_______/(_______/   )_(          (____/   \_______)

Figlet is a program for making large letters out of ordinary text.

Figlet-JS is a JavaScript implementation of a FIGdriver and is available as a Node module and a jQuery plugin.

For detailed information on fonts for Figlet, check out the FIGfont documentation.

Usage

Node

var puts = require("sys").puts;
var Figlet = require("./lib/figlet-node");
Figlet.write("node.js", "epic", function(str) {
	puts(str);
});

jQuery

$("pre").figlet("jQuery", "graffiti");

Written for Marak to support asciimo.


Support this project by donating on Gittip.

Comments
  • fix for final character of column not being '@'

    fix for final character of column not being '@'

    Previously the font parser assumed the column terminator character was always @ but this can change from font to font, e.g. in roman it is #. Now correctly recognized, as shown in demo.html.

    opened by ihh 2
  • Twitter tells no lies....

    Twitter tells no lies....

    I added a fourth field to the Figlet.write() function for text treatment. Currently, this means the option to add rainbow color to text or not.

    This can be observed in the rainbows.demo.js file, as well as the code below:

    // Set the last argument to 'rainbows' to generate a colorful text treatment
    Figlet.write("Figlet JS", "standard", function(str) {
        puts(str);
    }, 'rainbows');
    
    opened by nhunzaker 0
  • fix for final character of column not being '@'

    fix for final character of column not being '@'

    Here is a pull request from a branch containing just the bugfix, without all the code for the animation effect.

    I'm not sure when (if ever) I'll get around to separating the animation out into a plugin. Feel free to link to the master branch of my fork, or not :)

    Thanks for making this code, I love figlet.

    opened by ihh 0
  • Roman font have # instead of @

    Roman font have # instead of @

    Roman letter instance look like this:

      .oo.    $#
    .88' `8.  $#
    88.  .8'  $#
    `88.8P    $#
     d888[.8' $#
    88' `88.  $#
    `bodP'`88.$#
              $#
              $#
              $##
    
    opened by jcubic 1
  • Fix non ascii characters

    Fix non ascii characters

    Fix for issue #4 I try to fix it by calculating an offest. It seems that characters larger then 160 have extra line, but after struggle with it (and not every font have the same 102 offset)

    for i in fonts/*; do echo -n "$i ";sed '/^160/,$ d' < $i | grep @@ | wc -l; done
    

    I create a code that scan through array to search for the string that contain the character

    opened by jcubic 0
  • Non english letters are not rendered right

    Non english letters are not rendered right

    It seems that even original figlet don't display right letters, maybe because of the font. But anyway:

    original "ą"

     _   _ 
    (_)_(_)
      /_\  
     / _ \ 
    /_/ \_\
    

    wrong but rendered right, but figlet-js show some data from the font:

    
    0x010D  LATIN SMALL LETTER C WITH CARON
       \\//
       _\/ 
      / __|
     | (__ 
    

    one empty line before 0x010D. The reason for this non standard letters look like this in the file:

    196  LATIN CAPITAL LETTER A WITH DIAERESIS
      _   _ @
     (_)_(_)@
       /_\  @
      / _ \ @
     /_/ \_\@
            @@
    
    opened by jcubic 1
  • Spaces between letters

    Spaces between letters

    The kerning is different then linux figlet

    original figlet:

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

    figlet-js:

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

    one exra space plus original figlet merge two letters.

    original figlet produce the same output if called with:

    figlet h e l l o
    
    opened by jcubic 3
Owner
Scott González
I once used the GitHub API just to set this bio.
Scott González
A JavaScript library for binding keyboard combos without the pain of key codes and key combo conflicts.

KeyboardJS KeyboardJS is a library for use in the browser (node.js compatible). It Allows developers to easily setup key bindings. Use key combos to s

Robert Hurst 2k Dec 30, 2022
Knwl.js is a Javascript library that parses through text for dates, times, phone numbers, emails, places, and more.

Knwl.js Knwl.js is a Javascript library that parses through text for dates, times, phone numbers, emails, places, and more. Project Future The future

Ben Moore 5.3k Jan 1, 2023
JavaScript parser for FIGlet fonts

_______ _________ _______ _ _______ _________ _________ _______ ( ____ \\__ __/( ____ \( \ ( ____ \\__ __/ \__ _/(

Scott González 114 Oct 15, 2022
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
Json-parser - A parser for json-objects without dependencies

Json Parser This is a experimental tool that I create for educational purposes, it's based in the jq works With this tool you can parse json-like stri

Gabriel Guerra 1 Jan 3, 2022
Read and write OpenType fonts using JavaScript.

opentype.js · opentype.js is a JavaScript parser and writer for TrueType and OpenType fonts. It gives you access to the letterforms of text from the b

OpenType.js 3.8k Dec 29, 2022
⚗️ Zeplin extension that generates Swift snippets from colors, fonts, and layers

Zeplin extension that generates Swift snippets from colors, fonts and layers. Features ?? Color pallette for iOS Example import UIKit extension UICol

Artem Novichkov 83 May 29, 2022
Privacy-focused Google Fonts alternative

Privacy-focused Google Fonts CDN alternative I wrote it in an hour, so please report bugs here. Several improvements could be made here and there, so

coolLabs 245 Dec 27, 2022
A component built in angular 13 which can generate an signature image in different fonts based on the selection.

AngularSignatureGenerator This project was generated with Angular CLI version 13.2.6. Development server Run ng serve for a dev server. Navigate to ht

Rohith P 4 Apr 26, 2022
Syntax Highlighter supporting multiple languages, themes, fonts, highlighting from a URL, local file or post text.

Crayon Syntax Highlighter Supports multiple languages, themes, fonts, highlighting from a URL, local file or post text. Written in PHP and jQuery. Cra

Aram Kocharyan 1.1k Nov 26, 2022
A new renovated version of Directory to search @expo-google-fonts

Directory | AtilaDev Directory is an easy & quick search to find google fonts using @expo-google-fonts for your React Native App. Usage Press / key to

Leandro Favre 2 Oct 5, 2022
Javascript Canvas Library, SVG-to-Canvas (& canvas-to-SVG) Parser

Fabric.js Fabric.js is a framework that makes it easy to work with HTML5 canvas element. It is an interactive object model on top of canvas element. I

Fabric.js 23.6k Jan 3, 2023
Javascript Canvas Library, SVG-to-Canvas (& canvas-to-SVG) Parser

Fabric.js Fabric.js is a framework that makes it easy to work with HTML5 canvas element. It is an interactive object model on top of canvas element. I

Fabric.js 23.6k Jan 3, 2023
CSS Object Model implemented in pure JavaScript. It's also a parser!

CSSOM CSSOM.js is a CSS parser written in pure JavaScript. It is also a partial implementation of CSS Object Model. CSSOM.parse("body {color: black}")

Nikita Vasilyev 723 Dec 30, 2022
Receipt parser webapplication written in javascript and python.

Receipt Manager Webapp You can find pre-compiled releases on the Github release page. All the needed info about how to use the receipt-manager-webapp

null 37 Nov 27, 2022
Live port of Lark's standalone parser to Javascript

Lark.js Generate LALR(1) parsers in Javascript Lark is a popular parsing toolkit for Python. This project is a live port of the Lark standalone parser

Lark - Parsing Library & Toolkit 51 Nov 19, 2022
A simple inefficient and buggy JSON parser written in JavaScript. Just a fun project

A simple inefficient and buggy JSON parser written in JavaScript This JSON parser isn't guaranteed to work properly. Its recommended to use builtin JS

Pranav Baburaj 2 Feb 20, 2022