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

How to have different sized fonts in a single layer via expressions?

Community Beginner ,
Sep 28, 2020 Sep 28, 2020

Copy link to clipboard

Copied

I'm fairly new to using expressions, this seems like it should be simple but I couldn't work it out so would appreciate any help!

As per my screenshot, I would like to change the size of '%' but because I'm using expressions to set the number value (and it changes over time) it won't work through using Character panel. All I want to do is make the '%' half size, what expression can I use to get it to change the size of only part of the source text? Or how do I use the setFontSize expression to achieve what I want?

TOPICS
Expressions

Views

234

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
LEGEND ,
Sep 28, 2020 Sep 28, 2020

Copy link to clipboard

Copied

Pretty much utter nonsense for such a trivial setup. Simply pre-compose the counter and scale the layer in the parent comp with continuous rasterization enabled. Calculating the actual 50% size and limiting the string would be a ton more complicated.

 

Mylenium

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
Community Beginner ,
Sep 29, 2020 Sep 29, 2020

Copy link to clipboard

Copied

Forgive me if I do not understand, as I mentioned I am new to this. But from what I can gather, that means the '%' is static? I included it in the expression so that it would move as the counter counts up. So the distance between the numbers and the % is the same regardless of how many digits are in the counter. 

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
LEGEND ,
Sep 29, 2020 Sep 29, 2020

Copy link to clipboard

Copied

You can still have the text generated dynamically, you just only scale it in the parent comp. You might want to start by actually educating yourself about the many ways pre-composing/ creating sub-compositions is critical to structuring your AE work and solving such basic tasks. No point trying to do everything in a single comp.

 

Mylenium

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
Community Beginner ,
Sep 29, 2020 Sep 29, 2020

Copy link to clipboard

Copied

LATEST

Thanks for the suggestion, but how can I scale the '%' but still have it move with the text as if it is part of the same layer? I don't understand how your suggestion will allow the % to move as the text changes - which is what it does now.

 

 

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
Explorer ,
Sep 29, 2020 Sep 29, 2020

Copy link to clipboard

Copied

Use the character animator to scale the last digit of the string to 50%
If you expand the the Text Layer you can add animation properties there.

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