ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Find Lines of Paragraph

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Ramiro Dall'Agnese
Find Lines of Paragraph
on Jul 4, 2019 at 4:23:56 pm

Hello, I'm looking for a way to detect how many lines a paragraph text box has.

I need to tell a slider to adjust the size of a layer depending on the number of lines on the paragraph.

Thanks in advanced


Return to posts index

Tomas Bumbulevičius
Re: Find Lines of Paragraph
on Jul 4, 2019 at 6:10:27 pm

Hey Ramiro, few questions:

1. How big your area text box is in relation to comp size?
2. How many lines it fits until reaching the boundaries, being full sized?

As far as I remember, if text-area box contains more text & lines than it can fit, those lines disappear at the bottom. With that said - downscaling it won't help.

Find out more:
After Effects Tutorials: motion design, expressions, scripting.
Boxer - Dynamic Text Boxes Template with a Live Preview


Return to posts index

Ramiro Dall'Agnese
Re: Find Lines of Paragraph
on Jul 4, 2019 at 7:02:03 pm

It's smaller than the comp. About half size.
It's meant to only fit a max of 4 lines.

What I need is the text box to automatically tell a slider how many lines the box is currently holding. Whether it's 1, 2, 3 or 4.


Return to posts index


Kalleheikki Kannisto
Re: Find Lines of Paragraph
on Jul 5, 2019 at 6:30:52 am

Divide the internal source rectangle height by line spacing and round to nearest integer and you'll have the number of lines. Since you can't read line spacing with an expression, you have to use a variable that matches the line spacing value.

Kalleheikki Kannisto
Senior Graphic Designer


Return to posts index

Ramiro Dall'Agnese
Re: Find Lines of Paragraph
on Jul 5, 2019 at 2:35:51 pm

Fantastic. Thank you so much


Return to posts index

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