{"name":"load-bmfont","version":"1.4.1","description":"loads a BMFont file in Node and the browser","main":"index.js","browser":"browser.js","license":"MIT","author":{"name":"Matt DesLauriers","email":"dave.des@gmail.com","url":"https://github.com/mattdesl"},"dependencies":{"buffer-equal":"0.0.1","mime":"^1.3.4","parse-bmfont-ascii":"^1.0.3","parse-bmfont-binary":"^1.0.5","parse-bmfont-xml":"^1.1.4","phin":"^2.9.1","xhr":"^2.0.1","xtend":"^4.0.0"},"devDependencies":{"browserify":"^9.0.3","tap-spec":"^2.2.2","tape":"^3.5.0","testling":"^1.7.1"},"scripts":{"test-node":"node test.js | tap-spec","test-browser":"browserify test.js | testling | tap-spec","test":"npm run test-node && npm run test-browser"},"keywords":["bmfont","bitmap","font","angel","code","angelcode","parse","ascii","xml","text","json"],"repository":{"type":"git","url":"git://github.com/Jam3/load-bmfont.git"},"homepage":"https://github.com/Jam3/load-bmfont","bugs":{"url":"https://github.com/Jam3/load-bmfont/issues"},"gitHead":"2a6ce707925767b5a93222bf8b2dcbfa2773dff5","_id":"load-bmfont@1.4.1","_nodeVersion":"12.11.1","_npmVersion":"6.11.3","dist":{"integrity":"sha512-8UyQoYmdRDy81Brz6aLAUhfZLwr5zV0L3taTQ4hju7m6biuwiWiJXjPhBJxbUQJA8PrkvJ/7Enqmwk2sM14soA==","shasum":"c0f5f4711a1e2ccff725a7b6078087ccfcddd3e9","tarball":"http://registry-npm.ywwl.com/load-bmfont/download/load-bmfont-1.4.1.tgz","fileCount":7,"unpackedSize":9770,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe/Z7eCRA9TVsSAnZWagAAQXQP+wX8uu1FY9u8e8POGJDp\nI4QIr9PxwExWKTMqWRSA5wBxxc62BnWtZkdPv1ikmmiqxyc/ozl2uPNKk04N\nWQ4vsRMC1DvyeFYYXwJ/JXAYUK7pf+wCtPJmvDMi+g+k0WO5BNsiU5DYsMAE\nbnonG3qRsxPU1vqBAcZfAGKgjllb301qOF/lvwlEoqaxQFcoPBqDuq8nmyZ4\nyjv/ePdRaTUTfDSFSYniEiY/YMlEzqzgcN9aDf9EIqqTEh0iG/W7TrXIA9TX\nkpa1CXCmcfiEd7XLy2Kzcv7+XU7vnDBfC6HlaLbjqOPXg4wNjBEdvDb99hWw\nerxOIDuOC7MGmfO1fJcJjw2cq7G7a6UzPn5H3DRjocCW5kDYXkZWWFUfstv7\n3PcqhL6KyLlfhSib0Tq2SD6u2sgTxtwOUNoHzL+Y27fbO5VacuIEUGB6Dpjd\nNp/kuE5ZcZl2/rF4ScmyypMUO/z17NMivqGHrJanzNFxXeZoaRCHbjXoYE6y\n60zbJU8RCDqEZ4c3LYs87ySnF7iQzhDNEBFR7VonZrzxON+lik3flFQpnrsn\nfv1qX2sLUJCLX75OgOP+d0m0CsdpV9hgLw4zLq+vuzMTopNWlU/jEGn/ZHL+\nh1+04kXRSVtJFR6/vgUh8phtIkOY8qXr1pDASRTDQfTrcZXUhcPccgCA7AA5\nTeX0\r\n=FWsc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDVwxGpsAseiccZoLkuvkS6ifjYcARnxjMvmkwZ+nhRPgIgS9XcrptaVzx2vf9eoxB6r7WPjkf/McugY00HR8+cBRA="}],"size":4124,"noattachment":false,"key":"/load-bmfont/-/load-bmfont-1.4.1.tgz"},"maintainers":[{"name":"mattdesl","email":"dave.des@gmail.com"}],"_npmUser":{"name":"mattdesl","email":"dave.des@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/load-bmfont_1.4.1_1593679581942_0.5514823562622095"},"_hasShrinkwrap":false,"readme":"# load-bmfont\n\n[![stable](http://badges.github.io/stability-badges/dist/stable.svg)](http://github.com/badges/stability-badges)\n\nLoads an [AngelCode BMFont](http://www.angelcode.com/products/bmfont/) file in browser (with XHR) and node (with fs and [phin](https://github.com/ethanent/phin)), returning a [JSON representation](json-spec.md).\n\n```js\nvar load = require('load-bmfont')\n\nload('fonts/Arial-32.fnt', function(err, font) {\n  if (err)\n    throw err\n  \n  //The BMFont spec in JSON form\n  console.log(font.common.lineHeight)\n  console.log(font.info)\n  console.log(font.chars)\n  console.log(font.kernings)\n})\n```\n\nCurrently supported BMFont formats:\n\n- ASCII (text)\n- JSON\n- XML\n- binary\n\n## See Also\n\nSee [text-modules](https://github.com/mattdesl/text-modules) for related modules.\n\n## Usage\n\n[![NPM](https://nodei.co/npm/load-bmfont.png)](https://www.npmjs.com/package/load-bmfont)\n\n#### `load(opt, cb)`\n\nLoads a BMFont file with the `opt` settings and fires the callback with `(err, font)` params once finished. If `opt` is a string, it is used as the URI. Otherwise the options can be:\n\n- `uri` or `url` the path (in Node) or URI\n- `binary` boolean, whether the data should be read as binary, default false\n- (in node) options for `fs.readFile` or `phin`\n- (in browser) options for [xhr](https://github.com/Raynos/xhr)\n\nTo support binary files in the browser and Node, you should use `binary: true`. Otherwise the XHR request might come in the form of a UTF8 string, which will not work with binary files. This also sets up the XHR object to override mime type in older browsers.\n\n```js\nload({ \n  uri: 'fonts/Arial.bin', \n  binary: true\n}, function(err, font) {\n  console.log(font)\n})\n```\n\n## License\n\nMIT, see [LICENSE.md](http://github.com/Jam3/load-bmfont/blob/master/LICENSE.md) for details.\n","publish_time":1593679582063,"_cnpm_publish_time":1593679582063,"dist-tags":{"latest":"1.4.2"}}