Package Exports
- convert-bmfont
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (convert-bmfont) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
convert-bmfont
A command-line tool to convert a BMFont files from one format to another. Defaults to outputting a JSON representation for composition with other modules.
Installation:
npm install convert-bmfont -gUsage:
#convert text to binary
convert-bmfont Arial.xml --format bin > Arial.bin
#convert to pretty-printed JSON
convert-bmfont Arial.fnt --pretty > Arial.jsonCurrently supported BMFont inputs:
- XML
- ASCII (text)
- binary
- JSON
Currently supported outputs:
- JSON (default)
- binary
See Also
See text-modules for related modules.
Usage
CLI
Prints result to stdout.
Usage:
convert-bmfont input [opt]
Options:
-f, --format the format (bin, json) - default json
-p, --pretty pretty-print if output is jsonAPI
convert(file, opt, cb)
Converts the file with the given options, and calls the cb on completion.
Opt:
formatcan be "json", "bin" (or "binary") - default jsonprettywhether to pretty-print the JSON output
convert(__dirname+'/Blah.fnt', {
pretty: true,
format: 'json'
}, function(err, data) {
if (err) throw err
//data may be a Buffer or string
process.stdout.write(data)
})License
MIT, see LICENSE.md for details.
