# parse-bmfont-binary

> reads a BMFont binary in a Buffer into a JSON object

Latest version **1.0.6** (published 2015-04-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install parse-bmfont-binary
pnpm add parse-bmfont-binary
yarn add parse-bmfont-binary
bun add parse-bmfont-binary
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2015-04-27 |
| First published | 2015-03-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Matt DesLauriers |
| Maintainers | mattdesl |
| Keywords | bmfont, bitmap, font, angel, code, angelcode, fonts, text, layout, glyph, glyphdesigner, canvas, webgl |

## Links

- npm: https://www.npmjs.com/package/parse-bmfont-binary
- Repository: https://github.com/Jam3/parse-bmfont-binary
- Issues: https://github.com/Jam3/parse-bmfont-binary/issues
- npm.io page: https://npm.io/package/parse-bmfont-binary

## Alternatives

- [flatbuffers](https://npm.io/package/flatbuffers.md) — 6.0M weekly downloads
- [jwt-simple](https://npm.io/package/jwt-simple.md) — 259.5K weekly downloads
- [@exodus/patch-broken-hermes-typed-arrays](https://npm.io/package/@exodus/patch-broken-hermes-typed-arrays.md) — 28.5K weekly downloads
- [@native-to-anchor/buffer-layout](https://npm.io/package/@native-to-anchor/buffer-layout.md) — 12.2K weekly downloads
- [binary-parser-encoder](https://npm.io/package/binary-parser-encoder.md) — 5.3K weekly downloads

## Recent versions

- 1.0.6 (latest) — 2015-04-27
- 1.0.5 — 2015-03-14
- 1.0.4 — 2015-03-14

## README

# parse-bmfont-binary

[![stable](http://badges.github.io/stability-badges/dist/stable.svg)](http://github.com/badges/stability-badges)

Encodes a BMFont from a binary Buffer into JSON, as per the [BMFont Spec](http://www.angelcode.com/products/bmfont/doc/file_format.html). Can be used in Node or the browser (e.g. with browserify).

```js
var parse = require('parse-bmfont-binary')

fs.readFile('fonts/Lato.bin', function(err, data) {
  if (err) throw err
  var font = parse(data)
  
  //do something with your font
  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](https://github.com/mattdesl/text-modules) for related modules.

## Usage

[![NPM](https://nodei.co/npm/parse-bmfont-binary.png)](https://www.npmjs.com/package/parse-bmfont-binary)

#### `font = parse(buffer)`

Reads a binary BMFont Buffer and returns a new JSON representation of that font. See [here](https://github.com/mattdesl/bmfont2json/wiki/JsonSpec) for details on the return format.

## License

MIT, see [LICENSE.md](http://github.com/Jam3/parse-bmfont-binary/blob/master/LICENSE.md) for details.

---
_Source: https://npm.io/package/parse-bmfont-binary · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
