patorjk / figlet.js

A FIG Driver written in JavaScript which aims to fully implement the FIGfont spec.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

small slant.flf does not work in Ubuntu

toddwprice opened this issue · comments

Running this on Ubuntu:

const figlet = require('figlet');

console.log(
  chalk.keyword('orange')(
    figlet.textSync('scooter-cli', {font: 'small slant', horizontalLayout: 'full', verticalLayout: 'controlled smushing'})
  ) + 'v' + chalk.white.bold(pkg.version) + '\n\n\n'
);

...results in the following error:

Error: ENOENT: no such file or directory, open '/home/ubuntu/dev/scooter/cli/node_modules/figlet/fonts/small slant.flf'

Not critical but thought I would report it.

It may be a capitalization issue. Try:

const figlet = require('figlet');

console.log(
  chalk.keyword('orange')(
    figlet.textSync('scooter-cli', {font: 'Small Slant', horizontalLayout: 'full', verticalLayout: 'controlled smushing'})
  ) + 'v' + chalk.white.bold(pkg.version) + '\n\n\n'
);

Some OSes seem to not care about capitalization, which could lead to bugs. I'll need to think about how to best fix this type of situation. Thank you for the report.