-
Center anchorpoint, no matter the content of text field
Hi there,
wondering if there is an expression to always center the anchorpoint on a text layer, no matter how long the lines and how many lines there are? I found this expression but it just takes the height into account. Tried to rework it for the width but it gave me a weird result. Any help appreciated.
Expression for anchorpoint:
boxTop = this.sourceRectAtTime().top; // Position of top of text box
boxHeight = this.sourceRectAtTime().height; //Height of textbox//Offset anchor down from boxTop using half the height of the box
[value[0], boxTop + boxHeight/2 ];boxTop = this.sourceRectAtTime().top; // Position of top of text box
boxHeight = this.sourceRectAtTime().height; //Height of textbox//Offset anchor down from boxTop using half the height of the box
[value[0], boxTop + boxHeight/2 ];