Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions Using charAt on Expression Selector on Arabic (RTL) Text

  • Using charAt on Expression Selector on Arabic (RTL) Text

  • Fabio Basone

    April 27, 2020 at 1:23 pm

    Hello

    I’m developing a Mogrt template which i need to function in both Latin and Middle East & South Asian Languages.

    The template is fairly complex (for me, anyway!) but basically, I’ve created an input text field that automatically splits the text into separate text layers.
    It also allows the user to highlight specific words by adding a special character (^) before the word to be highlighted. This works through an expression added to an Expression selector for ‘highlight colour’.

    This is working well in the Latin (left to right) text version but when i try and build a similar function for an Arabic version the expression doesn’t work as expected. The highlight doesn’t appear on the word where i’ve added the “^” – it appears 2 words to the right of this word.

    Text Engine in Preferences are correct and the Arabic text otherwise appears correctly.

    Does anyone know how i can adjust the expression so that the word with the “^” character next to it, is highlighted?

    Hopefully, this makes sense and many thanks

    Fabio

    words = thisComp.layer("CtrlText").text.sourceText.split("\r")[0].split(" ");
    currentWord = words[textIndex-1];
    if(currentWord.charAt(0)=="^"){color=100}
    else{color = 0};
    [color,color,color];

Viewing 1 of 1 posts

Log in to reply.

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