Skip to main content
Participant
February 18, 2024
質問

editing text style inside an expression

  • February 18, 2024
  • 返信数 2.
  • 288 ビュー

I made a counter with an expression in a text layer. I wanted to append a text at the end of the expression but, as it is a formula I need to write it with subscripts and/or superscripts.

I know I can't edit the style inside an expression so my thought and question is how to link another text layer with my formula with the sub and superscripts to follow the increasing movement of the counter.

このトピックへの返信は締め切られました。

返信数 2

Dan Ebberts
Community Expert
Community Expert
February 18, 2024

Assuming that the number part is in a layer named "number" and that the two layers are already aligned in the y direction, a position expression like this for the formula layer should work (just set gap to the space you want between the two layers):

gap = 20;
L = thisComp.layer("number");
r = L.sourceRectAtTime(time,false);
x = L.toComp([r.left+r.width, r.top])[0];
r2 = sourceRectAtTime(time,false);
myX = toComp([r2.left, r2.top])[0];
value + [x - myX + gap, 0]

 

 

ERBIBI作成者
Participant
February 18, 2024

Thanks. Gonna try