patorjk / figlet.js

A FIG Driver written in JavaScript which aims to fully implement the FIGfont spec.
MIT License
2.61k stars 167 forks source link

small slant.flf does not work in Ubuntu #77

Open toddwprice opened 3 years ago

toddwprice commented 3 years ago

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.

patorjk commented 3 years ago

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.

fergiemcdowall commented 1 week ago

Just fixed a similar bug with isometric1 on Ubuntu. Capitalising to Isometric1 fixed it.