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

Registered trademark symbol in superscript style (automatically)

Participant ,
Mar 13, 2024 Mar 13, 2024

Copy link to clipboard

Copied

Hi, i use a lot this symbol ( ® ) in after effects. In other basic application, even notepad, if i type this symbol, it is recognized natively with superscript style. In after effects instead, it appear as standard size character.

Is there any options about this?

If not, an expression to apply to layer text would be great. I tried with "sourceText.replace", but it replace with the same, non superscript, character.

I use also mogrph files in premiere, so i have not access to text formatting options for a single char

Thanks

TOPICS
Expressions , How to

Views

709

Translate

Translate

Report

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

correct answers 2 Correct answers

Advocate , Mar 13, 2024 Mar 13, 2024

I tried using the text animators (scale and position) with an expression selector, but there seems to be an issue with positioning the symbols, for no reason you need to duplicate the animator and remove the scale animator or enable Per-Character 3D.

 

Expression selector Amount:

 

text.sourceText.charAt(textIndex - 1).match(/(®|©)/) ? 100 : 0

 

Position:

 

[value[0], -sourceRectAtTime().height / 2]

 

 

screenshot.png

 

Votes

Translate

Translate
Advocate , Mar 14, 2024 Mar 14, 2024

I don't know, the expression I gave you yesterday matches all occurrences of the registered trademark symbol. I updated the expression to make it work with multiline text.

text.sourceText.replace(/\r/g,'').charAt(textIndex - 1).match(/®/) ? 100 : 0

screenshot.png

 

 

Votes

Translate

Translate
Advocate ,
Mar 13, 2024 Mar 13, 2024

Copy link to clipboard

Copied

I tried using the text animators (scale and position) with an expression selector, but there seems to be an issue with positioning the symbols, for no reason you need to duplicate the animator and remove the scale animator or enable Per-Character 3D.

 

Expression selector Amount:

 

text.sourceText.charAt(textIndex - 1).match(/(®|©)/) ? 100 : 0

 

Position:

 

[value[0], -sourceRectAtTime().height / 2]

 

 

screenshot.png

 

Votes

Translate

Translate

Report

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
Participant ,
Mar 13, 2024 Mar 13, 2024

Copy link to clipboard

Copied

Thank you Airweb, but in my case the are some problem with this solution:

1- The ® could be at any point in the phrase, not always outside the boundingbox

2- Usually i have more than one symbol (they are like disclaimer text with lots of brand, ecc)

 

Time ago, i created a script that add a text animator for each symbol it found in the text layer, and apply to all the same position and scale i set manually. But i can't use it, 'cause i create mograph template to use in premiere pro.

 

If i'm not wrong, adobe recently added the possibility to edit, via expression, the text formatting options but it seems like I haven't seen the "superscript" option. 

 

Anyway, thanks for you time, appreciated! 🙂

Votes

Translate

Translate

Report

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
Participant ,
Mar 14, 2024 Mar 14, 2024

Copy link to clipboard

Copied

I'm trying to workaround the problem with expression and text animator. My idea for mogrt is to add 4 text animator (rarely i need more than 3 symbols) and expose position and scale property on the panel.
But i think this cannot work, cause the for loop always return the last character (in fact, it works only if the symbol is at the end).

I added this code to range selector start and a similar one to range selector end (i+1), to isolate the symbol

 

var text = text.sourceText;


for(i=0; i<text.length; i++)
	{
		if (text.value[i].match("®"))
		{
			i;
		}
	else 0;
	}

 

Is there a way to maintain the value of "i" when it match the char? I suppose not, using expressions 

Votes

Translate

Translate

Report

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 ,
Mar 14, 2024 Mar 14, 2024

Copy link to clipboard

Copied

I don't know, the expression I gave you yesterday matches all occurrences of the registered trademark symbol. I updated the expression to make it work with multiline text.

text.sourceText.replace(/\r/g,'').charAt(textIndex - 1).match(/®/) ? 100 : 0

screenshot.png

 

 

Votes

Translate

Translate

Report

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
Participant ,
Mar 15, 2024 Mar 15, 2024

Copy link to clipboard

Copied

LATEST

Ok, i'm stupid, i thought the expression was doing another thing, sorry! 🙂
It works perfectly, thank you!

Votes

Translate

Translate

Report

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