Skip to main content
Participating Frequently
June 22, 2023
Question

Mogrt Scripting

  • June 22, 2023
  • 1 reply
  • 464 views

Im trying to make a mogrt template but having problem because of the font that ime using. When im using the font meta pro, the base line of the numbers are off, it will only be aligned if i capitalize it.  

is there a way to write a script on it that it will detect numbers inside the text box and it will automatically capitalize it?

This topic has been closed for replies.

1 reply

Inspiring
June 22, 2023

This would be an After Effects question, not a Premiere one.

Anyway, you can add this expression to your Source Text property.

 

txt = thisLayer.text.sourceText;
hasNumbers = /\d/.test(txt);

if (hasNumbers) {
txt.toUpperCase();
} else {
txt;
}

nickpua2Author
Participating Frequently
June 23, 2023

Hi Sami, thanks for your help. i have another question. will that code somehow work on glyphs.

Have made a special glyph to replace the letter "m" because the original look doesnt really look like an "m"

 (make a wave). The "m" that i made look like this . Can the code detect a character and then  replace it with a special glyph.

 

Thanks for your help

 

 

nickpua2Author
Participating Frequently
June 23, 2023

Hi @Sami Succar , thanks for your help. I have another question. Will that code somehow work on glyphs.

Have made a special glyph to replace the letter "m" because the original look doesnt really look like an "m"

 (make a wave). The "m" that i made look like this . Can the code detect a character and then  replace it with a special glyph.

 

Thanks for your help