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

Is it possible to target fontSize but retain mixed font style?

New Here ,
Jun 29, 2023 Jun 29, 2023

Copy link to clipboard

Copied

Is it possible to target and set a text layer's font size to a slider, but retain whatever styling it originally had including mixed font style/weights? I'm trying to set up a template and would like to lockdown the font size based off a controller's slider to make sure all text layers are consistent, but still allow for each to be editable to bold or italize various characters.

 

For example, one text layer may have this:
Last Name, First Name. Bold because Important. Italicized Title of Something. Date.

 

After reading through several other posts, this controls the size but doesn't retain the mixed style/weight.

mySize = effect("Font Size")("Slider");
srcText = thisLayer.text.sourceText;
srcTextStyle = srcText.style;

srcTextStyle.setText(srcText).setFontSize(mySize);

 

TOPICS
Expressions

Views

142

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 1 Correct answer

Community Expert , Jun 29, 2023 Jun 29, 2023

Unfortunately, once an expression touches it, every character gets the same styling.

Votes

Translate

Translate
Community Expert ,
Jun 29, 2023 Jun 29, 2023

Copy link to clipboard

Copied

LATEST

Unfortunately, once an expression touches it, every character gets the same styling.

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