Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions access font size with expression? or cheat it?

  • access font size with expression? or cheat it?

    Posted by Andy Engelkemier on February 21, 2014 at 2:24 pm

    I have some text, and a matching “numbers” effect that I’ve spaced in line with that text. I have that several places, but at different font sizes.

    I’ve already created an expression to make it move together, just a basic value + transform.position did that. But I was hoping to link the font sizes. It doesn’t appear that expressions can access a layer font size?

    Am I just stuck scaling? That doesn’t work without a fairly complex expression, as you might have already guessed. So am I then stuck making a precomp of that?

    I’m thinking, to get the best quality, precomp it, but make the text bigger than anything I’d actually use, then scale it down later. If I use the little star/sunshin/whatever it’s called button to look at the original quality, that seems to mess up position/scale based effects.

    I’m running tight, so that’s what I’ll do for now, but what do you folks think? I’d like to know the best solution for next time.

    Kevin Camp replied 12 years, 2 months ago 2 Members · 1 Reply
  • 1 Reply
  • Kevin Camp

    February 21, 2014 at 8:46 pm

    [Andy Engelkemier] “It doesn’t appear that expressions can access a layer font size?”

    yep…

    i’d try to create what you are doing with the numbers effect in a text layer, probably the same text layer so that it would be the same size, font, etc. if that’s what you need.

    you can have an expression pull the value of the numbers effect into your text layer like this:

    target = thisComp.layer("Solid 1"); // make this your layer that has the numbers effect on it
    num = target.effect("Numbers")("Value/Offset/Random Max").value;
    txt = text.sourceText;
    txt + " " + num

    however none of the numbers formatting will come with it, which is what you may want. there are ways to do number formatting in a text layer with expressions.

    what’s in your text layer and what’s going on in your numbers effect layer?

    Kevin Camp
    Art Director
    KCPQ, KZJO & KRCW

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