Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Resizing font size automatically?

Participant ,
Mar 24, 2011 Mar 24, 2011

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

TOPICS
Scripting
2.0K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Apr 07, 2011 Apr 07, 2011

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+

...
Translate
Adobe
Community Expert ,
Mar 28, 2011 Mar 28, 2011

you can read below page as reference...

http://forums.adobe.com/message/3576774#3576774

It is push to countents width.

Ten.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 07, 2011 Apr 07, 2011

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.size = txObj.paragraphs.characters.size -0.5
            txObj.paragraphs.characters.leading = txObj.paragraphs.characters.leading -0.5
            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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Apr 07, 2011 Apr 07, 2011

This more than enough for me to get on, you have helped me very much.

Thanks

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Feb 04, 2013 Feb 04, 2013
LATEST

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines