Skip to main content
Participating Frequently
June 29, 2023
解決済み

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

  • June 29, 2023
  • 返信数 1.
  • 271 ビュー

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);

 

このトピックへの返信は締め切られました。
解決に役立った回答 Dan Ebberts

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

返信数 1

Dan Ebberts
Community Expert
Dan EbbertsCommunity Expert解決!
Community Expert
June 29, 2023

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