- Custom font, font size, letter spacing - Generate individual path for every char - Support any valid attributes and style - Handily cli
Install
To use the logo command, install it globally:
`` $ npm install logo.svg -g `
To use the JavaScript API, install logo.svg locally:
` $ npm install logo.svg --save `
If you need both the logo command and the JavaScript API, install logo.svg.js both ways.
Usage
$3
` $ logo [options] `
Options:
` -l, --logo ??? ............. The logo text. Default is the name of the package.json. -f, --font ??? ............. Specify the font path or url. -s, --fontSize ??? ......... Specify the font size. Default 72. -o, --output ??? ........... Specify the output path. Default logo.svg -c, --config ??? ........... Specify the .logorc file. -O, --overwrite ............ Overwrite when a logo file exist. Default true. -k, --kerning .............. Take kerning information into account. Default true. -d, --divided .............. Generate individual path for every char. Default false. -V, --version .............. Print the current version. -h, --help ................. You're looking at it. -h, --help ??? ............. Show details for the specified command. `
Examples:
` $ logo $ logo -Odo ./logo/logo.svg $ logo --config ./logo/.logorc $ logo --help $ logo --help font $ logo --help config $ logo --version `
$3
`js var logo = require('logo.svg'); // generate the svg string, then you can use it in you code var svg = logo.generate(options); `
Options
$3
The font's path or full url. If it's an url, we will load the font asynchronous then generate the logo.
If the path is relative, it is relative to the current work directory(process.cwd()).
If the path is a basename, such as fontName.ttf, we will fisrtly try to load it as a relative path, if that failed we will search it from the preset folder, and then search it from system and user fonts folders.
The preset folder is ./fonts/, contribute your fonts by pull request.
$3
The logo text. Default is the name in package.json.
$3
Horizontal position of the beginning of the text. (default: 0)
$3
Vertical position of the baseline of the text. (default: 0)
$3
Size of the text. (default: 72)
$3
The letter spacing. (default: 0)
$3
If true takes kerning information into account. (default: true)
$3
If true generates individual path for every char. (default: false)
$3
If true groups the individual with element. (default: false)