Copy link to clipboard
Copied
Does anyone have any idea how to auto fit overset text in a fixed text frame?
I import many languages into fixed text frames and it is a pain to keep resizing or scaling manually.
As of yet I've been unable to source any javascript or applescript that can do it. The closest has been "JET_AutoFitVertical.jsx" but this resizes the text frames
Cheers for any help
I think I'd better write answer here. Because we write there, mail to Lionel. Maybe he do not want recieve this kind of...
If you want stop HrizontalScaling stop to 70% and scaling size, below...
while (cntsLength != visibleChar) {
if (vscale>0.7){
scalingWidth(slct, [vscale,1]);
} else {
scalingSize(slct);
}
visibleChar =getVisible(slct);
vscale = vscale-stepNum;
}
function scalingSize(txObj){
for (var i=0;i<txObj.paragraphs.length;i+
Copy link to clipboard
Copied
you can read below page as reference...
http://forums.adobe.com/message/3576774#3576774
It is push to countents width.
Ten.
Copy link to clipboard
Copied
I think I'd better write answer here. Because we write there, mail to Lionel. Maybe he do not want recieve this kind of...
If you want stop HrizontalScaling stop to 70% and scaling size, below...
while (cntsLength != visibleChar) {
if (vscale>0.7){
scalingWidth(slct, [vscale,1]);
} else {
scalingSize(slct);
}
visibleChar =getVisible(slct);
vscale = vscale-stepNum;
}
function scalingSize(txObj){
for (var i=0;i<txObj.paragraphs.length;i++){
txObj.paragraphs.size = txObj.paragraphs.size - 0.5;
txObj.paragraphs.leading = txObj.paragraphs.leading - 0.25;
redraw();
}
}
change while loop. And add a function. It provides scaling size and leading.
But if contain dIfferent size in paragraphs, We must add loop and set properties each characters.
example.
function scalingSize(txObj){
for (var i=0;i<txObj.paragraphs.length;i++){
for(var j=0;j<txObj.paragraphs.characters.length;j++ ){
txObj.paragraphs.characters
txObj.paragraphs.characters
rerdraw();
}
}
}
and...You want coloring.
myColor = new CMYKColor;
myColor .cyan = 0;
myColor .magenta = 100;
myColor .yellow = 60;
myColor .black = 0;
app.activeDocument.selection[0].fillColor = myColor ;
Its very simple sample code for apply cmyk colors.
I'm so busy and you will finish this yourself.
Ten wrote...sorry to broken English.
Copy link to clipboard
Copied
This more than enough for me to get on, you have helped me very much.
Thanks
Copy link to clipboard
Copied
Hi Ten A, been a while!
I have been asked to add a function to this that will ask me for some specific peramaters.
The request is for a prompt that will allow a layer value, minimum font size and increment to scale down font to be added.
So if my layer was 'layer 1' and my minimum font size was 6 point with an incremental scale factor of 0.5, I would write in the window 'Layer 1, 6.0, 0.5'. In this instance if the point size is less than 6 point it would stop and highlight the text then move on to the next text panel?
I'm going to have a look at this but I was hoping for some valuable feedback.
Cheers