Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Change font for a part of textSource with scripting

  • Change font for a part of textSource with scripting

    Posted by Tomas Bumbulevičius on May 9, 2017 at 11:51 am

    Hello,

    I am familiar with changing fonts for a whole layer/textSource through scripting.

    However, would it be possible to apply different FONT FAMILY options for only a portion in the X words of a text layer?

    For example:
    ‘We have a test sentence in a textSource’

    And I would like to change font for ‘test sentence’, where it would look like:
    ‘We have a test sentence(different font) in a textSource’

    Changing options like fill weight, tracking, etc, could be done by accessing ‘Text Animator’ properties and affecting the range. However, what about the font?

    Thank you!

    Dan Ebberts replied 9 years ago 2 Members · 3 Replies
  • 3 Replies
  • Dan Ebberts

    May 9, 2017 at 3:44 pm

    Unfortunately, all characters get the same formatting.

    Dan

  • Tomas Bumbulevičius

    May 9, 2017 at 10:53 pm

    Dan,

    thanks a lot for your input, I had only small chances with fingers crossed that it could be possible.

    The best workaround would be to add text word after word, estimating the space gaps between the words while formatting each of them separately?Assuming I have a line of text and creating layer from scratch.

    However, in such case ‘Text Animator’ control over the whole phrase would be lost. Seems like win-lose situation here(:

  • Dan Ebberts

    May 9, 2017 at 11:50 pm

    Depending on what you’re doing with the Animators, you could possibly control them using Expression Selectors with expression that would take into account the previous text layers. It would probably be a pain to set up for a one-off, but might be worth it for a template.

    Dan

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