nodejs
https://www.npmjs.com/package/figlet
Github https://github.com/patorjk/figlet.js
yarn add figlet
const figlet = require('figlet');
figlet('Hello World!!', function(err, data) {
if (err) {
console.log('Something went wrong...');
console.dir(err);
return;
}
console.log(data)
})
figlet修改字体
figlet.text('Boo!', {
font: 'Ghost',
horizontalLayout: 'default',
verticalLayout: 'default',
width: 80,
whitespaceBreak: true
}, function(err, data) {
if (err) {
console.log('Something went wrong...');
console.dir(err);
return;
}
console.log(data);
});
figlet.org
figlet 命令
figlet [ -cklnoprstvxDELNRSWX ] [ -d fontdirectory ]
[ -f fontfile ] [ -m smushmode ] [ -w outputwidth ]
[ -C controlfile ] [ -I infocode ] [ message ]
Mac
sudo brew install figlet