One of the most tedious jobs is fitting text to the space it is supposed to take up. A little bigger, a little smaller, wait! the text is different sizes… sigh… Well, here’s a few scripts to help with a couple of different situations…
You have a headline which must fit to the margin widths. It may even be a two line heading. What to do?
“Fit Text To Frame” to the rescue!
There’s two scripts which are used in this situation: FitTextPrefs, and FitTextToFrame.
FitTextPrefs allows you to set some simple preferences for the Fit Text to Frame script. When you run FitTextPrefs, you get presented with a dialog with four options:
The first two options will expand the text frame down to the bottom baseline or descender respectively only if necessary.
The last two options will move the frame bottom either up or down to fit the frame bottom ensuring that the frame bottom always fits the text.
Once we set the preferences, a simple double-click on the FitTextToFrame script will fit the text of the current frame.
Some quick pointers on using Fit Text to Frame:
- Fit Text to Frame will attempt to bring any overset text back into the text frame. This might result in more than one line.
- If there are multiple lines in the text frame, the text of the longest line will be fit to the frame. All other text will be scaled proportionally.
- Text of different sizes will all be scaled proportionally.
- If all the text cannot be fit, Fit Text to Frame will abort.
- Fit Text to Frame does not adjust leading. If there are multiple lines, it usually works best if the leading is set to “Auto”.
You have the unlucky job of fitting a story into a predefined space. You tried to explain to the client that to properly fit text takes a lot of finesse and very often copy-editing, but they won’t hear of it. You will need to fit the text exactly to the text frame precisely 30 seconds before it goes to press. 😉
Fill Text Frame to the rescue!
Fill Text Frame is really very basic. It will scale all the text currently in the frame to the maximum size that will fit in the frame without spilling out of the frame.
- Fill Text Frame will not bring back any text which is overset.
- Fill Text Frame scales all the text proportionally.
- Fill Text Frame does not adjust leading. It usually works best if the leading is set to “Auto”.