Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions How can i change the Text Size and change the Character Style in especific letter

  • How can i change the Text Size and change the Character Style in especific letter

    Posted by Adrián Wulfrath on June 9, 2015 at 7:08 pm

    Hello, i have this code for a blinking writting text:

    L = text.sourceText.length;
    T = time*effect(“Speed”)(“Slider”) – effect(“Start At”)(“Slider”)*effect(“Speed”)(“Slider”);
    F = Math.round(time % 1);

    if(F == 1 | (T0) ){Fl = “|”;}else{Fl=” “;}

    substr(0,T) + Fl

    But i want to personalise the size of the Blinking Cursor “|” change the size and change the character style just for that cursor. How can i do that?

    L = text.sourceText.length;
    T = time*effect("Speed")("Slider") - effect("Start At")("Slider")*effect("Speed")("Slider");
    F = Math.round(time % 1);

    if(F == 1 | (T0) ){Fl = "|";}else{Fl=" ";}

    substr(0,T) + Fl

    Adrián Wulfrath replied 11 years, 1 month ago 2 Members · 5 Replies
  • 5 Replies
  • Dan Ebberts

    June 9, 2015 at 7:25 pm

    I can’t think of any way to do that directly in one expression, but you could have another text layer with the cursor and keep it positioned to the right of the visible text using sourceRectAtTime().

    Dan

  • Adrián Wulfrath

    June 9, 2015 at 7:27 pm

    So how can i use that correctly?

    Add another text and put that expression in Source Text?

  • Adrián Wulfrath

    June 9, 2015 at 8:38 pm

    sorry for asking 2 times but how can i do that? about 2 texts and then use sourceRectATime() but where i put the expression to move the other Text with the right align?

  • Dan Ebberts

    June 9, 2015 at 10:31 pm

    Sorry, I’ve been fairly inaccessible for the last couple of days(jury duty).

    You would apply something like this to the position property of the cursor layer:

    xOffset = 15;
    yOffset = -25;
    L = thisComp.layer(“text”);
    rect = L.sourceRectAtTime(time,false);
    L.toComp([rect.left+rect.width,rect.top+rect.height]) + [xOffset,yOffset];

    Adjust xOffset and yOffset to get it just where you want it.

    Presumably, you would apply your alternating ” ” and “|” to the source text property.

    Dan

  • Adrián Wulfrath

    June 9, 2015 at 10:38 pm

    i will try so thank you very much

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy