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

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

Community Beginner ,
Jun 29, 2023 Jun 29, 2023

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
210
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

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.

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

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

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