by Chris Sauvé of pxldot
Squishy is a jQuery plugin that automatically resizes text to exactly fit the container with no extra work on your part.
You can pass the script a number of options to restrict the squishiness. maxSize
is used to set the maximum font size, minSize
is used to set the minimum font size, maxWidth
sets the maximum width of the line of text, and minWidth
, the minimum (all in pixels, for now).
Much thanks to the guys at Paravel for their work on FitText, on which this script is largely based. This plugin only works for a single line; if you are looking for multiline text fitting, I recommend SlabText.
You can view a demo on the project page for this plugin.