parse-bmfont-binary
1.0.6 • Public • Published parse-bmfont-binary

Encodes a BMFont from a binary Buffer into JSON, as per the BMFont Spec. Can be used in Node or the browser (e.g. with browserify).
var parse = require('parse-bmfont-binary')
fs.readFile('fonts/Lato.bin', function(err, data) {
if (err) throw err
var font = parse(data)
console.log(font.info.face)
console.log(font.info.size)
console.log(font.common.lineHeight)
console.log(font.chars)
console.log(font.kernings)
})
See Also
See text-modules for related modules.
Usage

font = parse(buffer)
Reads a binary BMFont Buffer and returns a new JSON representation of that font. See here for details on the return format.
License
MIT, see LICENSE.md for details.
Versions
Version | Downloads (Last 7 Days) | Tag |
---|
1.0.6 | 1,495,020 | latest |
Version History
Version | Downloads (Last 7 Days) | Published |
---|
1.0.6 | 1,495,020 | |
1.0.5 | 24 | |
1.0.4 | 0 | |
Package Sidebar
Install
npm i parse-bmfont-binary
Weekly Downloads