{"name":"calculate-size","version":"0.1.0","description":"Calculate the pixel size of a string","main":"src/calculate-size.js","scripts":{"test":"grunt test"},"repository":{"type":"git","url":"https://github.com/schickling/calculate-size.git"},"keywords":["font","calculate","size","width","height","dimension"],"author":{"name":"Johannes Schickling","email":"schickling.j@gmail.com","url":"https://github.com/schickling"},"license":"MIT","bugs":{"url":"https://github.com/schickling/calculate-size/issues"},"homepage":"https://github.com/schickling/calculate-size","devDependencies":{"grunt":"~0.4.2","grunt-casper":"~0.3.0","grunt-contrib-connect":"~0.7.0","load-grunt-tasks":"~0.3.0","casperjs":"~1.1.0-beta3","phantomjs":"~1.9.7-1"},"gitHead":"2b8caad797b4091d19a4a566eb7ef0e6952c1fac","_id":"calculate-size@0.1.0","_shasum":"5c4b0576c30b502c36dab0fc4b6240a92784c678","_from":".","_npmVersion":"2.7.5","_nodeVersion":"0.12.2","_npmUser":{"name":"schickling","email":"schickling.j@gmail.com"},"maintainers":[{"name":"schickling","email":"schickling.j@gmail.com"}],"dist":{"shasum":"5c4b0576c30b502c36dab0fc4b6240a92784c678","tarball":"http://registry-npm.ywwl.com/calculate-size/download/calculate-size-0.1.0.tgz","integrity":"sha512-DgSxP76BUsoWGbhVU2joJmGNlXakjs9BnvU+AKjrMZ5EoRj7ZTcutcIF3tz+HYCly3RTrZuC50MVS2E55iOT2g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDCyUlnCUrNIVSTjoZ+aj4/wNYFLQiqo30tUdM2JlCPpQIhAOwqUOZ7Ijr4ofvAfBye7BQeS3GP6Lme1AjXBAl5oC5h"}],"size":2966,"noattachment":false,"key":"/calculate-size/-/calculate-size-0.1.0.tgz"},"directories":{},"readme":"calculate-size [![Build Status](https://travis-ci.org/schickling/calculate-size.svg?branch=master)](https://travis-ci.org/schickling/calculate-size) [![npm version](https://badge.fury.io/js/calculate-size.svg)](https://badge.fury.io/js/calculate-size)\n==============\n\nCalculate the pixel size (width/height) of a string (with integrated caching)\n\n## Install\n\n> This package supports Typescript out-of-the-box\n\n```sh\n$ npm install calculate-size\n```\n\n## Usage\n\n```js\nconst size = calculateSize('Hello world!', {\n   font: 'Arial',\n   fontSize: '12px'\n})\n\n### Options\n\n* `font: string`\n* `fontSize: string`\n* `fontWeight: string`\n* `width: string` (Constraint width by a fixed value to calc height)\n\nconsole.log(size.width) // 140\nconsole.log(size.height) // 20\n```\n","publish_time":1432580613452,"_cnpm_publish_time":1432580613452,"dist-tags":{"latest":"1.1.1"}}