Despite the re-work of Illustrator's "text engine" in version CS, Illustrator's text object interface remains as archaic as ever. Scripts can do little to overcome that, but text manipulation scripts can be quite handy for automating text content changes.

Link to zip archiveDownload The .zip Archive

The AutoFitVertical script is an attempt at a poor-man's answer to FreeHand's ability to make a text frame shrink or enlarge vertically to accommodate its content. Frankly, it's a disappointing attempt in that it runs so slowly. The two ConcatenateText scripts resulted from a real-world need while manipulating text imported from CAD .dxf files. I use those two scripts quite frequently, as demonstrated in the PDF. The SetCapHeight script resulted from frequent questions on the Illustrator user forum posted by Corel Draw users who miss that program's ability to specify type size by its cap height (a feature popular among sign designers).

Link to example image Link to PDF file JET_AutoFitVertical.jsx
Illustrator does not provide a means by which to auto-fit a text frame to its contents. This results in frequent accidental overset text. This script eliminates overset text by incrementally enlarging the selected textFrame's textPath until all of its text is visible. Shrinks oversized textFrame textPaths by incrementally reducing the height until the number of characters visible is fewer than those contained, then enlarges one increment to reveal all the text.

To Use: Select AreaType object(s). Run the script.


Link to PDF file JET_ConcatenateTextAtEnd.jsx
Adds text from the frontmost selected text object to the end of the content of each of the other selected text objects. Useful for inserting paragraph returns at the ends of many PointType objects prior to joining them by copying and pasting into a single textFrame.

To Use: Create a textFrame object (can be either Area Type or Point Type) containing the text that you want to add to the end of other text objects. Select the new textFrame and all the other text objects you wish to affect. Run the script.

JET_ConcatenateTextAtStart.jsx
Adds text from the frontmost selected text object to the start of the content of each of the other selected text objects. Useful for inserting tabs or other characters at the starts of many PointType objects prior to joining them by copying and pasting into a single textFrame.

To Use: Create a textFrame object (can be either Area Type or Point Type) containing the text that you want to add to the start of other text objects. Select the new textFrame and all the other text objects you wish to affect. Run the script.


Link to example image JET_SetCapHeight.jsx
Normally, text size specifies the height of the font's em square, not a measure of the actual glyphs, such as the height of the capitals. Sometimes, it is desirable (especially among sign cutters) to specify text size in terms of cap height. This script allows the user to select a range of text and set its size by capheight. Capheight is assumed to be the height of the capital M outline.

To Use: Select the range of text characters within a textFrame object that you want to affect. Run the script. The script will prompt you for a desired cap height measure, expressed in inches.


Link to example image JET_UnrotateTextFrames.jsx
Rotates already rotated TextFrame objects in the current selection back to the normal zero-degree orientation.

To Use: Select one or more rotated textFrame objects. (Can be Area Type or Point Type.) Run the script. The script corrects simple rotation. It does not undo any other non-proportional distortions that may have been applied to the text. If the text has undergone character width changes, or has been skewed, or otherwise distorted after being rotated, the unrotated results will not appear as expected, although it is technically correct. The bounding boxes are not rotated with the textFrame objects. Therefore, after runing the script, and while the objects are still selected, choose Object>Transform>ResetBoundingBox to unrotate the textFrame bounding boxes.


Link to PDF file JET_VariablesFTROU.jsx
The title abreviates "variables for the rest of us." Illustrator's Variables panel expects to work with XML. However, XML is quite cumbersome compared to the more common need to create DataSets from ordinary delimited textual values (as in a spreadsheet). This script creates Illustrator Variables and Data Sets from ordinary tab-delimited text that has been typed or pasted into a normal Illustrator textFrame on the Artboard.

To Use: Enter tab-delimited text into a textFrame. (Can be Area Type or Point Type.) The top line of text will become the variable names. The left column will become the DataSet names. Run the Script. Variables and DataSets will appear in the Variables Panel. A set of text objects will be created at the upper left corner of the Artboard. Those text objects will be bound Variables. Arrange and format the Variables as desired. Cycle through the DataSets to change their values.