Auto Align Second Line

Vertically positions subtitle under a title without guessing offsets.

Code

var main = thisComp.layer("Line1");
var sr = main.sourceRectAtTime();
offs = 10; // pixels gap
var x = main.position[0];
var y = main.position[1] + sr.height / 2 + offs + value[1] - value[1];
[x, y];
layouttitlestext

How to Use

Rename top line "Line1", apply this to the lower line's Position, tweak `offs` gap.