Activity › Forums › Adobe After Effects Expressions › Find Lines of Paragraph
-
Find Lines of Paragraph
Posted by Ramiro Dall’agnese on July 4, 2019 at 4:23 pmHello, 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
Ramiro Dall’agnese replied 7 years, 2 months ago 3 Members · 4 Replies -
4 Replies
-
Tomas Bumbulevičius
July 4, 2019 at 6:10 pmHey 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 -
Ramiro Dall’agnese
July 4, 2019 at 7:02 pmIt’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.
-
Kalleheikki Kannisto
July 5, 2019 at 6:30 amDivide 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
Reply to this Discussion! Login or Sign Up