Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
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;
}
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
Hi Sami,
I tried the code and it made the letters into upper case, but left the numbers unchanged.
Thanks