khrome / ascii-art

A Node.js library for ansi codes, figlet fonts, ascii art and other ASCII graphics
MIT License
681 stars 287 forks source link

This does not install non-contributed fonts #8

Closed Raithybabes closed 6 years ago

Raithybabes commented 6 years ago

Using Mac, with High Sierra, Node v9.6.1 (and any previous version), and up-to-date install of ascii-art

These work: ascii-art install chunky ascii-art install hex

Most others fail, e.g.: ascii-art install big ascii-art install block ascii-art install bubble

Please can you look into this? The fonts are available for manual download and installation from the figlet website.

khrome commented 6 years ago

It installs anything in the contributed directory of the ftp endpoint:

ftp://ftp.figlet.org/pub/figlet/fonts/contributed/

This means you can't install the 14 international fonts, the 1 MSDOS font or the 17 "ours" fonts. The root of the issue is there is no uniform path to all the fonts. I could solve this with a prefix, but what's better: remembering path prefixes or having the names you are used to but missing 17 of nearly 200 fonts?

Raithybabes commented 6 years ago

Thanks khrome. I wasn't aware of that ftp endpoint. I've taken a look and I can see that I picked almost all of the unavailable ones to test it on! Just my luck :(

Thanks for confirming that the contributed folder is where it installs from. I'll bear in mind.

And thanks for the cool util :)

khrome commented 6 years ago

I just added failover to the bin file. It will now just look in all the directories until it finds something. It's checked into the repository, but it will take a few days to land on NPM

Raithybabes commented 6 years ago

Great, thanks for the enhancement. I'll look out for this arriving in the coming week.

Raithybabes commented 6 years ago

Not yet landed on NPM. Package.json version not updated since Jan 2017. Is this scheduled for npm publish soon, or held up by other fixes/improvements? Thanks

khrome commented 6 years ago

1.4.3 is on npm!