Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Automatic Font size script?

  • Automatic Font size script?

    Posted by Janmaarten De wit on March 30, 2009 at 7:46 pm

    Hi people, sorry for my shitty english. ;-P

    I’ve been searching the web like a mad man for a certain scrip.

    Is there a scrip witch automatically resizes the fonts according to the size of a composition?
    So the text always fills the maximum amount of space in my composition??

    The reason why??
    I’m using automator in combination with a script to adjust the text outside of AE, and rendering my project in the background with AErender.

    Thank U very very much in advance!!!!!

    Filip Vandueren replied 17 years, 1 month ago 2 Members · 1 Reply
  • 1 Reply
  • Filip Vandueren

    March 30, 2009 at 11:20 pm

    With scripts it’s possible, with expressions it’s not.

    A script can know the pixel dimensions of a textLayer like this;

    // l=yourlayer

    rect=l.sourceRectAtTime(l.time,false);

    this returns an object with object with four attributes: [top, left, width, height].

    so rect.width and rect.height will give you pixel dimensions you can use to calculate the scla you should set your text layer to, to obtain 90% of comp.width (I assume you want to stay within safety)

    Does this set you in the right direction, or do you need a kant-en-klaar script 😉

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy