ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

All Caps source text expression?

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
jacques levet
All Caps source text expression?
on Jul 6, 2020 at 5:55:41 pm

Hello everyone!
I m currently animating a string of numbers and I need them set with the all caps button pressed so they match the height of the letters on another layer.
However when I apply a character offset animator to the number string layer, it reverts to smaller numbers. I've tried with the "preserve digits" option but still no luck
Is there an expression I can apply to my source text to force the numbers to stay in AllCAps?

Thank you in advance for your suggestions.


Return to posts index

Scott McGee
Re: All Caps source text expression?
on Jul 7, 2020 at 7:50:19 am

Not quite sure what the problem is, unless your offset has a scale adjustment on it.

Either you need to px size on your text, or scale. To firstly make sure that isn't the issue. If you are using different font then you need to look more into your scale to resize.

So you'd match the height by using sourceRectAtTime(), which there is plenty of documentation around. Something like this would work. (Pinched from Dan Ebberts)

s1 = thisComp.layer("Bottom Line").sourceRectAtTime().width; //the line I'm trying to match
s2 = thisLayer.sourceRectAtTime().width;
s = (s1/s2)*100;
[s,s]


Return to posts index

Filip Vandueren
Re: All Caps source text expression?
on Jul 7, 2020 at 8:16:21 am

What font are you using ?

I've read about the All Caps trick to force After effects to use Proportional Lining alternatives.
However I can't find a font on my system that defaults to Oldstyle AND has Proportional lining alternatives built in.
So I'm having trouble to replicate your problem, makes it hard to find a solution :-)



Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2020 CreativeCOW.net All Rights Reserved
[TOP]