-
Text Box ‘Bottom Up’ Expression with x-heights?
Hi!
Can this expression be modified to ignore text descender?
var b = sourceRectAtTime(time,true);
b.left *= scale[0]/100;
b.top *= scale[1]/100;
b.width *= scale[0]/100;
b.height *= scale[1]/100;
[b.left + b.width/2 , b.top + b.height]I’m using it in a lower third which is made up of left-justified text, centred, in a shape layer. This shape layer is a box, centred on the screen which (using pins & boxes) adjust automatically to the text layer.
When you add a second or third line of text (thanks to the expression above), the text remains anchored to centred/bottom and each new line of text pushes the existing line of text up. Similar to how a typewriter works.
It all works perfectly until you add a character descender, as the text layer jumps up so the bottom of the descender sits on this anchor point.
I’ve attached an image of what happens, the issue being a box with two lines of text will be a different position to a box with two lines of text with a descender.
I did find this fantastic resource here going into great deal about xHeights and numLines, but it’s far beyond my understanding to meld the two. https://www.motiondeveloper.com/blog/dealing-with-descenders
I really really appreciate any help you can give me as I’ve been search and testing for days with no luck.
Thank you
Henry