@types/figlet

  • Version 1.5.4
  • Published
  • 13 kB
  • No dependencies
  • MIT license

Install

npm i @types/figlet
yarn add @types/figlet
pnpm add @types/figlet

Overview

TypeScript definitions for figlet

Index

Functions

function defaults

defaults: (opt?: Partial<Defaults>) => Defaults;

    function figlet

    figlet: typeof figlet;

      function fonts

      fonts: (cb: (error: Error | null, fontList?: Fonts[]) => void) => void;
      • This method exists in node environment only. In browser environment, this method does not exist.

      function fontsSync

      fontsSync: () => Fonts[];
      • This method exists in node environment only. In browser environment, this method does not exist.

      function loadFont

      loadFont: (
      font: Fonts,
      cb: (error: Error | null, fontOptions?: FontOptions) => void
      ) => void;

        function loadFontSync

        loadFontSync: (font: Fonts) => FontOptions;
        • This method works in node environment only. In browser environment, this method does not work.

        function metadata

        metadata: (
        font: Fonts,
        cb: (
        error: Error | null,
        fontOptions?: FontOptions,
        headerComment?: string
        ) => void
        ) => void;

          function parseFont

          parseFont: (fontName: string, fontFile: string) => void;
          • Load a custom font from a file.

            Parameter fontName

            The name you want to give the new font.

            Parameter fontFile

            The data from the font file.

          function text

          text: {
          (txt: string, cb: (error: Error | null, result?: string) => void): void;
          (txt: string, font: Fonts, cb: (error: Error, result?: string) => void): void;
          (
          txt: string,
          options: Options,
          cb: (error: Error, result?: string) => void
          ): void;
          };
          • This unified-signatures is disabled because Fonts type is too long

          function textSync

          textSync: {
          (txt: string, font?: Fonts): string;
          (txt: string, options: Options): string;
          };
          • This unified-signatures is disabled because Fonts type is too long

          Interfaces

          interface Defaults

          interface Defaults {}

            property font

            font: Fonts;

              property fontPath

              fontPath: string;

                interface FittingRules

                interface FittingRules {}

                  property hLayout

                  hLayout: number;

                    property hRule1

                    hRule1: boolean;

                      property hRule2

                      hRule2: boolean;

                        property hRule3

                        hRule3: boolean;

                          property hRule4

                          hRule4: boolean;

                            property hRule5

                            hRule5: boolean;

                              property hRule6

                              hRule6: boolean;

                                property vLayout

                                vLayout: number;

                                  property vRule1

                                  vRule1: boolean;

                                    property vRule2

                                    vRule2: boolean;

                                      property vRule3

                                      vRule3: boolean;

                                        property vRule4

                                        vRule4: boolean;

                                          property vRule5

                                          vRule5: boolean;

                                            interface FontOptions

                                            interface FontOptions {}

                                              property baseline

                                              baseline: number;

                                                property codeTagCount

                                                codeTagCount: number | null;

                                                  property fittingRules

                                                  fittingRules: FittingRules;

                                                    property fullLayout

                                                    fullLayout: number | null;

                                                      property hardBlank

                                                      hardBlank: string;

                                                        property height

                                                        height: number;

                                                          property maxLength

                                                          maxLength: number;

                                                            property numCommentLines

                                                            numCommentLines: number;

                                                              property oldLayout

                                                              oldLayout: number;

                                                                property printDirection

                                                                printDirection: PrintDirection;

                                                                  interface Options

                                                                  interface Options {}

                                                                    property font

                                                                    font?: Fonts | undefined;

                                                                      property horizontalLayout

                                                                      horizontalLayout?: KerningMethods | undefined;

                                                                        property printDirection

                                                                        printDirection?: PrintDirection | undefined;

                                                                          property showHardBlanks

                                                                          showHardBlanks?: boolean | undefined;

                                                                            property verticalLayout

                                                                            verticalLayout?: KerningMethods | undefined;

                                                                              property whitespaceBreak

                                                                              whitespaceBreak?: boolean | undefined;
                                                                              • This option works in conjunction with "width". If this option is set to true, then the library will attempt to break text up on whitespace when limiting the width. false

                                                                              property width

                                                                              width?: number | undefined;
                                                                              • This option allows you to limit the width of the output. For example, if you want your output to be a max of 80 characters wide, you would set this option to 80. undefined

                                                                              Type Aliases

                                                                              type Fonts

                                                                              type Fonts =
                                                                              | '1Row'
                                                                              | '3-D'
                                                                              | '3D Diagonal'
                                                                              | '3D-ASCII'
                                                                              | '3x5'
                                                                              | '4Max'
                                                                              | '5 Line Oblique'
                                                                              | 'AMC 3 Line'
                                                                              | 'AMC 3 Liv1'
                                                                              | 'AMC AAA01'
                                                                              | 'AMC Neko'
                                                                              | 'AMC Razor'
                                                                              | 'AMC Razor2'
                                                                              | 'AMC Slash'
                                                                              | 'AMC Slider'
                                                                              | 'AMC Thin'
                                                                              | 'AMC Tubes'
                                                                              | 'AMC Untitled'
                                                                              | 'ANSI Regular'
                                                                              | 'ANSI Shadow'
                                                                              | 'ASCII New Roman'
                                                                              | 'Acrobatic'
                                                                              | 'Alligator'
                                                                              | 'Alligator2'
                                                                              | 'Alpha'
                                                                              | 'Alphabet'
                                                                              | 'Arrows'
                                                                              | 'Avatar'
                                                                              | 'B1FF'
                                                                              | 'B1FF'
                                                                              | 'Banner'
                                                                              | 'Banner3-D'
                                                                              | 'Banner3'
                                                                              | 'Banner4'
                                                                              | 'Barbwire'
                                                                              | 'Basic'
                                                                              | 'Bear'
                                                                              | 'Bell'
                                                                              | 'Benjamin'
                                                                              | 'Big Chief'
                                                                              | 'Big Money-ne'
                                                                              | 'Big Money-nw'
                                                                              | 'Big Money-se'
                                                                              | 'Big Money-sw'
                                                                              | 'Big'
                                                                              | 'Bigfig'
                                                                              | 'Binary'
                                                                              | 'Block'
                                                                              | 'Blocks'
                                                                              | 'Bloody'
                                                                              | 'Bolger'
                                                                              | 'Braced'
                                                                              | 'Bright'
                                                                              | 'Broadway KB'
                                                                              | 'Broadway'
                                                                              | 'Bubble'
                                                                              | 'Bulbhead'
                                                                              | 'Caligraphy'
                                                                              | 'Caligraphy2'
                                                                              | 'Calvin S'
                                                                              | 'Cards'
                                                                              | 'Catwalk'
                                                                              | 'Chiseled'
                                                                              | 'Chunky'
                                                                              | 'Coinstak'
                                                                              | 'Cola'
                                                                              | 'Colossal'
                                                                              | 'Computer'
                                                                              | 'Contessa'
                                                                              | 'Contrast'
                                                                              | 'Cosmike'
                                                                              | 'Crawford'
                                                                              | 'Crawford2'
                                                                              | 'Crazy'
                                                                              | 'Cricket'
                                                                              | 'Cursive'
                                                                              | 'Cyberlarge'
                                                                              | 'Cybermedium'
                                                                              | 'Cybersmall'
                                                                              | 'Cygnet'
                                                                              | 'DANC4'
                                                                              | 'DOS Rebel'
                                                                              | 'DWhistled'
                                                                              | 'Dancing Font'
                                                                              | 'Decimal'
                                                                              | 'Def Leppard'
                                                                              | 'Delta Corps Priest 1'
                                                                              | 'Diamond'
                                                                              | 'Diet Cola'
                                                                              | 'Digital'
                                                                              | 'Doh'
                                                                              | 'Doom'
                                                                              | 'Dot Matrix'
                                                                              | 'Double Shorts'
                                                                              | 'Double'
                                                                              | 'Dr Pepper'
                                                                              | 'Efti Chess'
                                                                              | 'Efti Font'
                                                                              | 'Efti Italic'
                                                                              | 'Efti Piti'
                                                                              | 'Efti Robot'
                                                                              | 'Efti Wall'
                                                                              | 'Efti Water'
                                                                              | 'Electronic'
                                                                              | 'Elite'
                                                                              | 'Epic'
                                                                              | 'Fender'
                                                                              | 'Filter'
                                                                              | 'Fire Font-k'
                                                                              | 'Fire Font-s'
                                                                              | 'Flipped'
                                                                              | 'Flower Power'
                                                                              | 'Four Tops'
                                                                              | 'Fraktur'
                                                                              | 'Fun Face'
                                                                              | 'Fun Faces'
                                                                              | 'Fuzzy'
                                                                              | 'Georgi16'
                                                                              | 'Georgia11'
                                                                              | 'Ghost'
                                                                              | 'Ghoulish'
                                                                              | 'Glenyn'
                                                                              | 'Goofy'
                                                                              | 'Gothic'
                                                                              | 'Graceful'
                                                                              | 'Gradient'
                                                                              | 'Graffiti'
                                                                              | 'Greek'
                                                                              | 'Heart Left'
                                                                              | 'Heart Right'
                                                                              | 'Henry 3D'
                                                                              | 'Hex'
                                                                              | 'Hieroglyphs'
                                                                              | 'Hollywood'
                                                                              | 'Horizontal Left'
                                                                              | 'Horizontal Right'
                                                                              | 'ICL-1900'
                                                                              | 'Impossible'
                                                                              | 'Invita'
                                                                              | 'Isometric1'
                                                                              | 'Isometric2'
                                                                              | 'Isometric3'
                                                                              | 'Isometric4'
                                                                              | 'Italic'
                                                                              | 'Ivrit'
                                                                              | 'JS Block Letters'
                                                                              | 'JS Bracket Letters'
                                                                              | 'JS Capital Curves'
                                                                              | 'JS Cursive'
                                                                              | 'JS Stick Letters'
                                                                              | 'Jacky'
                                                                              | 'Jazmine'
                                                                              | 'Jerusalem'
                                                                              | 'Katakana'
                                                                              | 'Kban'
                                                                              | 'Keyboard'
                                                                              | 'Knob'
                                                                              | 'Konto Slant'
                                                                              | 'Konto'
                                                                              | 'LCD'
                                                                              | 'Larry 3D 2'
                                                                              | 'Larry 3D'
                                                                              | 'Lean'
                                                                              | 'Letters'
                                                                              | 'Lil Devil'
                                                                              | 'Line Blocks'
                                                                              | 'Linux'
                                                                              | 'Lockergnome'
                                                                              | 'Madrid'
                                                                              | 'Marquee'
                                                                              | 'Maxfour'
                                                                              | 'Merlin1'
                                                                              | 'Merlin2'
                                                                              | 'Mike'
                                                                              | 'Mini'
                                                                              | 'Mirror'
                                                                              | 'Mnemonic'
                                                                              | 'Modular'
                                                                              | 'Morse'
                                                                              | 'Morse2'
                                                                              | 'Moscow'
                                                                              | 'Mshebrew210'
                                                                              | 'Muzzle'
                                                                              | 'NScript'
                                                                              | 'NT Greek'
                                                                              | 'NV Script'
                                                                              | 'Nancyj-Fancy'
                                                                              | 'Nancyj-Improved'
                                                                              | 'Nancyj-Underlined'
                                                                              | 'Nancyj'
                                                                              | 'Nipples'
                                                                              | 'O8'
                                                                              | 'OS2'
                                                                              | 'Octal'
                                                                              | 'Ogre'
                                                                              | 'Old Banner'
                                                                              | "Patorjk's Cheese"
                                                                              | 'Patorjk-HeX'
                                                                              | 'Pawp'
                                                                              | 'Peaks Slant'
                                                                              | 'Peaks'
                                                                              | 'Pebbles'
                                                                              | 'Pepper'
                                                                              | 'Poison'
                                                                              | 'Puffy'
                                                                              | 'Puzzle'
                                                                              | 'Pyramid'
                                                                              | 'Rammstein'
                                                                              | 'Rectangles'
                                                                              | 'Red Phoenix'
                                                                              | 'Relief'
                                                                              | 'Relief2'
                                                                              | 'Reverse'
                                                                              | 'Roman'
                                                                              | 'Rot13'
                                                                              | 'Rot13'
                                                                              | 'Rotated'
                                                                              | 'Rounded'
                                                                              | 'Rowan Cap'
                                                                              | 'Rozzo'
                                                                              | 'Runic'
                                                                              | 'Runyc'
                                                                              | 'S Blood'
                                                                              | 'SL Script'
                                                                              | 'Santa Clara'
                                                                              | 'Script'
                                                                              | 'Serifcap'
                                                                              | 'Shadow'
                                                                              | 'Shimrod'
                                                                              | 'Short'
                                                                              | 'Slant Relief'
                                                                              | 'Slant'
                                                                              | 'Slide'
                                                                              | 'Small Caps'
                                                                              | 'Small Isometric1'
                                                                              | 'Small Keyboard'
                                                                              | 'Small Poison'
                                                                              | 'Small Script'
                                                                              | 'Small Shadow'
                                                                              | 'Small Slant'
                                                                              | 'Small Tengwar'
                                                                              | 'Small'
                                                                              | 'Soft'
                                                                              | 'Speed'
                                                                              | 'Spliff'
                                                                              | 'Stacey'
                                                                              | 'Stampate'
                                                                              | 'Stampatello'
                                                                              | 'Standard'
                                                                              | 'Star Strips'
                                                                              | 'Star Wars'
                                                                              | 'Stellar'
                                                                              | 'Stforek'
                                                                              | 'Stick Letters'
                                                                              | 'Stop'
                                                                              | 'Straight'
                                                                              | 'Stronger Than All'
                                                                              | 'Sub-Zero'
                                                                              | 'Swamp Land'
                                                                              | 'Swan'
                                                                              | 'Sweet'
                                                                              | 'THIS'
                                                                              | 'Tanja'
                                                                              | 'Tengwar'
                                                                              | 'Term'
                                                                              | 'Test1'
                                                                              | 'The Edge'
                                                                              | 'Thick'
                                                                              | 'Thin'
                                                                              | 'Thorned'
                                                                              | 'Three Point'
                                                                              | 'Ticks Slant'
                                                                              | 'Ticks'
                                                                              | 'Tiles'
                                                                              | 'Tinker-Toy'
                                                                              | 'Tombstone'
                                                                              | 'Train'
                                                                              | 'Trek'
                                                                              | 'Tsalagi'
                                                                              | 'Tubular'
                                                                              | 'Twisted'
                                                                              | 'Two Point'
                                                                              | 'USA Flag'
                                                                              | 'Univers'
                                                                              | 'Varsity'
                                                                              | 'Wavy'
                                                                              | 'Weird'
                                                                              | 'Wet Letter'
                                                                              | 'Whimsy'
                                                                              | 'Wow';

                                                                                type KerningMethods

                                                                                type KerningMethods =
                                                                                | 'default'
                                                                                | 'full'
                                                                                | 'fitted'
                                                                                | 'controlled smushing'
                                                                                | 'universal smushing';

                                                                                  type PrintDirection

                                                                                  type PrintDirection = number;

                                                                                    Package Files (1)

                                                                                    Dependencies (0)

                                                                                    No dependencies.

                                                                                    Dev Dependencies (0)

                                                                                    No dev dependencies.

                                                                                    Peer Dependencies (0)

                                                                                    No peer dependencies.

                                                                                    Badge

                                                                                    To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                                    You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/figlet.

                                                                                    • Markdown
                                                                                      [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/figlet)
                                                                                    • HTML
                                                                                      <a href="https://www.jsdocs.io/package/@types/figlet"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>