Illustrator version 10 installed with a sample script named ChangeSizesOfTextSelection.js. The script gradually changes the size of text.
The way it works is, you type some text in Illustrator, select it as an object, and run the script. The script incrementally decreases the size of the text until it gets to the center character, and then it incrementally increases the size of the text. This works in Illustrator 10. However, in Illustrator CS4 it doesn't do a thing. Below is a copy of the script.
I'd love it if someone could help out with a fix for the script so that it is usable in CS4.
-----------------------------------
// change size of paragraph text
//$.bp();
ChangeSize();
function ChangeSize()
{
selectedItems = selection;
// check to make sure something is selected.
if (selectedItems.length == 0)
{
alert("Nothing is selected");
return;
}
endIndex = selectedItems.length;
for (index = 0; index < endIndex; index++)
{
pageObject = selectedItems[index];
pageItemType = pageObject.typename;
if (pageItemType == "TextArtItem")
{
// get the paragraphs from the selection.
theTextRange = pageObject.textRange();
paraTextRange = theTextRange.paragraphs;
numParagraphs = paraTextRange.length;
for (i = 0 ; i < numParagraphs ; i++)
{
aParagraph = paraTextRange[i];
charTextRange = aParagraph.characters;
charCount = charTextRange.length;
if (charCount > 1)
{
halfWay = Math.round(charCount/2);
fontSizeChanger = 36/halfWay;
currentFontSize = 48;
for (j = 0 ; j < halfWay-1; j++)
{
theChar = charTextRange[j];
theChar.size = currentFontSize;
currentFontSize = currentFontSize - fontSizeChanger;
}
for (j = halfWay; j < charCount ; j++)
{
theChar = charTextRange[j];
theChar.size = currentFontSize;
currentFontSize = currentFontSize + fontSizeChanger;
}
}
}
}
}
}