BB Text Fitter

Some text that by default doesn't fit its parent container. This text at its regular size of 18px in fact exceeds the fixed height of the parent, but we can solve that by calling bbFitText().

Regular settings, only scaling down to fit height.

Centered

Centering vertically & horizontally, not scaling up.

Enlarged

Scaling up in width.

This text contains a very long and impressivelycomplicated word, or perhaps we just forgot a space.

Perfect scaling of big words.

Force text on single line

Force text on fitted single line.

Nice big line height

Set line height with em.

Any combination of any number of fonts

Set line height with em.

Padding works too

Put padding on parent with
box-sizing: border-box;

Some text

A little more text

Some more text still ;)

It's possible to fit all your text nodes with just one call.

Some text

A little more text

Some more text still ;)

It's also possible to equalize selected text nodes.

I watched the movie 'It' and now I suffer from coulro~phobia.

Smart word breaking for extra control over layout.

The Plugin

BB Text Fitter is a plugin developed to help you with fitting text into a limited amount of space. This can occur when designing a responsive site with some complex layout, or if you have text coming from a database that should fit a certain container, but you don't have control over the amount of text provided.

Thanks to some excellent user feedback over time, this plugin has come to include a wealth of interesting features. Most of these are included into the Text Fitter plugin itself, and can be configured by changing the plugin settings. The exception to this is the Equalize Text feature, which has evolved to become a separate plugin by itself. It is included with Text Fitter, and can be used immediately.


Usage

To start using the Text Fitter plugin, simply browse to the Github page, download the plugin, and include it in your project. Instructions on how to use the plugin are provided there as well.


Changelog

2.2.1
Fixed
• IE bug when vertically aligning and scaling up

2.2.0
Added
• Smart Word Breaker functionality
• Smartbreak character now configurable in options

2.1.0
Added
• Text Equalizer plugin
• Text Equalizer can be called seperately, after fitting

2.0.0
Added
• New repository with completely rebuilt textfitter
• Text Aligner included in main plugin
• Upscaling is now optional


download