Skip to main content
Inspiring
May 21, 2020 6:22 AM UTC
Question

.replace() to change letter into a different glyph

Hey Guys,

 

I have the source text of a layer referencing the comp name. I'd to edit the comp name and it update on the text layer. This is my code.

 

compName = comp("Liam Carlin").name.replace(/a/gi,"a");

 

However I am not trying to replace the letter a with the same letter a I wasnt to replace it with a different glyph version of that font family. Is it possible? I am unable to paste the correct glyph letter into the expression editor as it just see it as the letter 'a'.

 

Thanks

Liam 

This topic is closed to new replies. Start a new post to keep the conversation going.

10 replies

Mylenium
Legend
May 21, 2020 6:26 AM UTC

You need to force it with string.fromCharCode().

 

Mylenium

Translate
Inspiring
May 21, 2020 6:35 AM UTC

Thanks Mylenium, I'll dig into this and if stuck will get back! Cheers 🙂

Translate