Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Mogrt Scripting

New Here ,
Jun 21, 2023 Jun 21, 2023

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.  

nickpua2_0-1687398755819.png

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?

TOPICS
Editing , Formats , How to
496
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Jun 21, 2023 Jun 21, 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;
}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 22, 2023 Jun 22, 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"

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

 

Thanks for your help

 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 22, 2023 Jun 22, 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"

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

 

Thanks for your help

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 02, 2023 Jul 02, 2023
LATEST

Hi Sami, 

 

I tried the code and it made the letters into upper case, but left the numbers unchanged.

nickpua2_0-1688364091585.png

 

Thanks

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines