Fit Text
Free Drupal module · GPL-2.0-or-later
A Drupal port of the FitText.js plugin — headlines that scale to fill their container instead of wrapping.
November 2011 — from the first wave of modules, before the themes started.
Fit Text wraps Dave Rupert's FitText.js plugin as a Drupal module. The problem it solves is one CSS could not solve at the time: a headline sized in pixels is either too large on a phone or too small on a wide monitor, and a headline sized in a viewport-relative unit was not something the browsers of 2011 could be relied on to support. FitText measures the container and scales the type to fill it.
The Drupal work is not the algorithm — that is the plugin's — it is the configuration surface. The module lets a site administrator enter a list of jQuery selectors in the admin UI, one per line, and set the plugin's "compressor" value, which controls how aggressively the text shrinks relative to its container. Both of those otherwise required editing a JavaScript file inside a theme, which is exactly the kind of thing that stops a site builder from using a technique at all.
That is what most of these early modules actually are: a good third-party library, plus the settings form that lets someone who does not write JavaScript use it, plus the Drupal plumbing to load it on the right pages. It is unglamorous integration work, and it is also the majority of what platform engineering turns out to be — wrapping something capable in an interface the people who need it can operate.
Six releases went out in November 2011, across both a 6.x-1.x and a 7.x-1.x branch, and there were none after that. It is the most installed of my modules, which is a low bar, and the reason is straightforward: it does one small thing and it kept doing it.
- Project page
- drupal.org/project/fit_text
- Reported installs
- 67 sites report using it on drupal.org, as of August 2026
- Releases I shipped
- 6, November 2011
- On branches
- 6.x-1.x, 7.x-1.x
Downloads, the full release history and the issue queue all live on the drupal.org project page. The other modules, and everything alongside them, are on the open-source index — and next from here: Configuration as the product surface.
Working on a marketplace or ordering platform?
I've spent 14+ years architecting exactly these systems — happy to talk through your platform, your stack, or a partnership.