{"_id":"fittext.js","_rev":"3-ee234beed124062d8d92fb12b9b89d75","name":"fittext.js","description":"FitText makes font-sizes flexible. Use this plugin on your responsive design for ratio-based resizing of your headlines.","dist-tags":{"latest":"1.2.0"},"versions":{"1.2.0":{"name":"fittext.js","version":"1.2.0","description":"FitText makes font-sizes flexible. Use this plugin on your responsive design for ratio-based resizing of your headlines.","main":"jquery.fittext.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/magora-suchkov/FitText.js.git"},"author":{"name":"Dave Rupert"},"license":"WTFPL","bugs":{"url":"https://github.com/magora-suchkov/FitText.js/issues"},"homepage":"https://github.com/magora-suchkov/FitText.js#readme","gitHead":"07374d7ade72e7c340a267c6285f96be57435792","_id":"fittext.js@1.2.0","_shasum":"e753d5263239237d28f3015e8a9694569bb43cb6","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"pointofpresence","email":"npm@pointofpresence.ru"},"maintainers":[{"name":"pointofpresence","email":"npm@pointofpresence.ru"}],"dist":{"shasum":"e753d5263239237d28f3015e8a9694569bb43cb6","tarball":"https://registry.npmjs.org/fittext.js/-/fittext.js-1.2.0.tgz","integrity":"sha512-t74oh607jFTvZ1zelX5nVlxrLbk0iREVSgvn5HZhltUj34ANAaFNtORHwmXEHUiPNcZVk252G52hFnFLjLHBqg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDEVl3mRyETcZzNgSiWAcFnPKL7SnmMQVcNLB+Ly3mhPQIgYJAAlra1qDUYMkJ+MoaUHn+KKglx3uwbvnBlD5WXns8="}]}}},"readme":"# FitText.js, a jQuery plugin for inflating web type\nFitText makes font-sizes flexible. Use this plugin on your responsive design for ratio-based resizing of your headlines.\n\n## How it works\nHere is a simple FitText setup:\n\n```html\n<script src=\"http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js\"></script>\n<script src=\"jquery.fittext.js\"></script>\n<script>\n  jQuery(\"#responsive_headline\").fitText();\n</script>\n```\n\nYour text should now fluidly resize, by default: Font-size = 1/10th of the element's width.\n\n## The Compressor\nIf your text is resizing poorly, you'll want to turn tweak up/down \"The Compressor\". It works a little like a guitar amp. The default is `1`.\n\n```javascript\njQuery(\"#responsive_headline\").fitText(1.2); // Turn the compressor up   (resizes more aggressively)\njQuery(\"#responsive_headline\").fitText(0.8); // Turn the compressor down (resizes less aggressively)\n```\n\nThis will hopefully give you a level of \"control\" that might not be pixel perfect, but resizes smoothly & nicely.\n\n## minFontSize & maxFontSize\nFitText now allows you to specify two optional pixel values: `minFontSize` and `maxFontSize`. Great for situations when you want to preserve hierarchy.\n\n```javascript\njQuery(\"#responsive_headline\").fitText(1.2, { minFontSize: '20px', maxFontSize: '40px' });\n```\n\n## CSS FAQ\n\n- **Make sure your container has a width!**\n  - `display: inline` elements don't have a width. Use `display: block` OR `display: inline-block`+ a specified width (i.e. `width: 100%`).\n  - `position:absolute` elements need a specified width as well.\n- Tweak until you like it.\n- Set a No-JS fallback font-size in your CSS.\n\n## Don't use jQuery?\nThat's okay. Check out these handy non-jQuery versions maintained by other people.\n\n- [non-jQuery FitText](https://github.com/adactio/FitText.js) from @adactio\n- [Angular.js FitText.js](https://github.com/patrickmarabeas/AngularJS-FitText.js) from @patrickmarabeas\n\n## Changelog\n* `v 1.2` - Added `onorientationchange` event\n* `v 1.1` - FitText now ignores font-size and has minFontSize & maxFontSize options\n* `v 1.0.1` - Fix for broken font-size.\n* `v 1.0` - Initial Release\n\n## In Use:\n- [Trent Walton](http://trentwalton.com)\n\nIf you want more exact fitting text, there are plugins for that! We recommend checking out [BigText](https://github.com/zachleat/BigText) by Zach Leatherman or [SlabText](https://github.com/freqDec/slabText) by Brian McAllister.\n\n### Download, Fork, Commit.\nIf you think you can make this better, please Download, Fork, & Commit. We'd love to see your ideas.\n","maintainers":[{"name":"pointofpresence","email":"npm@pointofpresence.ru"}],"time":{"modified":"2022-06-18T01:45:58.821Z","created":"2015-09-09T13:09:32.681Z","1.2.0":"2015-09-09T13:09:32.681Z"},"homepage":"https://github.com/magora-suchkov/FitText.js#readme","repository":{"type":"git","url":"git+https://github.com/magora-suchkov/FitText.js.git"},"author":{"name":"Dave Rupert"},"bugs":{"url":"https://github.com/magora-suchkov/FitText.js/issues"},"license":"WTFPL","readmeFilename":"README.md"}