ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Auto Scaling Text Vertically

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Solinda Keth
Auto Scaling Text Vertically
on Jul 15, 2020 at 11:36:10 pm

Hey guys, I'm trying to scale text and I'm having a hard time adjusting it to "squish" when it gets to a certain size.

My text has a text bar that grows with it.
The top image is with shorter text at normal size.
The second is when there's a lot of text involved - the text shrinks uniformly once it hits a certain width. As you can see it kinda gets a little small.
The third pic is sort of how I would want the text to scale. The characters would stay a certain width but get tall if that makes sense.



Below is the expression that i'm currently using.
Any help would be appreciated!

maxW = 64; // in percentage of comp width
rect = sourceRectAtTime();
if ( 100 * rect.width / thisComp.width > maxW ) s = maxW * thisComp.width / rect.width;
else s = 100;
[ s, s ]


Return to posts index

Filip Vandueren
Re: Auto Scaling Text Vertically
on Jul 16, 2020 at 4:53:30 pm

Hi Solinda.

I’m afraid squashing text is a very poor design decision.
Fonts that have their carefully crafted proportions tampered with look amateurish in my opinion.
It also looks like an awful lot of small text for a video project, although maybe you are animating/lay-outing slides or a video essay where you’re sure the viewer has the time to read that long of a text.

See this thread for a solution on using a text-box that forces a maximum line-length before wrapping text and that scales up, not down to ensure never getting below a certain font-size

https://forums.creativecow.net/thread/227/45433#45458

And keep in mind: sometimes brevity in copywriting is the best part of a design :-)



Return to posts index

Solinda Keth
Re: Auto Scaling Text Vertically
on Jul 16, 2020 at 6:10:19 pm

Thanks Filip! While I do agree that it looks bad squished, unfortunately it's what the client wants. Not sure if you're familiar with VizRT (used on Fox, ESPN, most news stations), but it's also how the text is usually displayed on a lower third since it does look bigger.

My current expression does have a Max Width without the need of a text box, it just scales so it's smaller, similar to what you have.



Thanks anyway!


Return to posts index


Filip Vandueren
Re: Auto Scaling Text Vertically
on Jul 16, 2020 at 7:59:46 pm

Hi there,
Just replace your last line of the expression with [s,100]; and you should get the reeuslt you need.

FYI, a quick proof of concept ☺



using Bernini Sans Regular / Narrow / Condensed / Compressed


Return to posts index

Filip Vandueren
Re: Auto Scaling Text Vertically
on Jul 16, 2020 at 8:02:56 pm

Source:


txt=thisComp.layer(1);
w=txt.sourceRectAtTime(time).width;

if (w<640) {
f = "BerninaSans";
} else if (w<715) {
f = "BerninaSans-Narrow";
} else if (w<800){
f = "BerninaSans-Condensed";
} else {
f = "BerninaSans-Compressed";
}

style = createStyle();
style.setText(txt.text.sourceText.value + "\r" + f).setFont(f);


Who knows, in another 10 years After effects might support variable Fonts, then another 10 before we can control them with expressions :-)



Return to posts index

Solinda Keth
Re: Auto Scaling Text Vertically
on Jul 16, 2020 at 8:09:37 pm

hahah we need more effects! Thanks so much for your help! ☺ The client better like it :P


Return to posts index


Tomas Bumbulevičius
Re: Auto Scaling Text Vertically
on Jul 30, 2020 at 12:15:17 pm

Hey Solinda, additionally to what Filip has suggested, I think adding text-tracking could be also a good way of overcoming this issue,

Meaning - when text lenght goes beyond certain value, text tracking between characters decreases. Then - you won't have stretched out text, nor different font families - win win!

Find out more:
Motion Graphics Design & After Effects Tutorials
On YT
On VH


Return to posts index

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