text length before and after a return
Hi everyone, I have an expression set up where a center aligned text places itself to the left margin.
The text is center aligned so the 2 lines of text will always be centered to itself.
But in this case, my left margin is on an angle.
So my challenge is sometimes the 2nd line may be longer than the first line and vice versa, so due to the angle of the guide layer, I need the expression to know which line is longer, I would just add a variable to move this layer a certain amount of pixels to the right if the condition is met, can someone help me with the syntax.
the expression works when the 2nd line is longer
The expression as it is right now is on the y of a null ( separate dimensions )
is there a way it could be;
x= sourcerectattime before the return;
y= sourcerectattime after the return;
if y > x w; else v+20
I have included the 2 screen shots to show that it does not work when the first line is longer than the line after the return. I also included a reduced version of the project.
Thanks for any help.
I realize I can separate the text into 2 lines which would also solve my problem. I wanted to avoid that because my plan is to add further expressions elsewhere if the text is only 1 line, so I would have a variable that looks at the layer height to determine if its 1 line or 2.