I'm not sure how many of you use scripts within Illustrator but if you do I thought I would share one that I modified from Adobe. This script creates a smooth downward scale of any text object. The effect is simple, but one that many people seem to want to do. It will work with any text object.
Text Scaling
Text Scaling
Code:
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 == "TextFrame")
{
// 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)
{
beginFontSize = 50;
endFontSize = Math.round(beginFontSize*0.2);
fontChange = Math.round((beginFontSize - endFontSize)/(charCount-2));
for (j = 0 ; j < charCount; j++)
{
theChar = charTextRange[j];
theChar.size = currentFontSize;***
currentFontSize = currentFontSize - fontChange;
}
}
}
}
}
}
Last edited: