Naked Panda Meditations

    unpack-bmfonts

    1.0.0 • Public • Published

    unpack-bmfonts

    experimental

    Unpacks a binary buffer of packed BMFont objects. See the spec for binary details, or pack-bmfonts to generate the binary file.

    var unpack = require('unpack-bmfonts')
     
    fs.readFile('packed-fonts.bin', function(err, data) {
      var fonts = unpack(data)
      
      //the array of BMFont JSON objects  
      console.log(fonts)
     
      console.log(fonts[0].common.lineHeight)
      console.log(fonts[0].info.face)
    })

    Usage

    NPM

    fonts = unpack(buffer)

    Unpacks a Buffer of packed binary fonts.

    License

    MIT, see LICENSE.md for details.

    Install

    npm i unpack-bmfonts

    DownloadsWeekly Downloads

    0

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • mattdesl