Hoi Tineke,
since we can’t change the font size per line, we’d have to do it with a text animator.
The example you chose works well since a 120% scale applies at amount -100 will give 80% scale.
here’s the recipe:
– Add a text animator for Scale
– set the scale value to 120
– give it an expression selector based on lines
– give it this expression:
lines = thisLayer.text.sourceText.value.split(/\r\n|\r|\n|\x03/);
l = lines[textIndex-1].length;
if (l<7) {
100;
} else if (l<12) {
0
} else {
-100;
}
Don’t forget to set the text’s Anchor Point grouping to Line also (Text -> More options) otherwise only the individual characters will become smaller in place.
Depending on your paragraph alignment, you might also need to adjust the Grouping Alignment ([0,0] for centered text, [-100,0] for left aligned, [100,0] for right aligned)
NB: I’ve also added \x03 to the linesplitter, that’s the character After Effects uses for a soft linebreak (shift-enter)