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

How to have various text styles in a single textbox via scripting

Explorer ,
Sep 28, 2016 Sep 28, 2016

Copy link to clipboard

Copied

I am searching for a way do to have some control over styling word in a textbox via scripting. For exemple, I want to put, in a textbox, the words:

“Lt amet, consectetur adipiscing elit”

I know how to make the whole textbox bold, but how can I get that word to be bold without affecting the entire textbox?

TOPICS
Scripting

Views

731

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

Advocate , Sep 28, 2016 Sep 28, 2016

Unfortunately ExtendScript still does not support per character styles. The only workaround would be to split the text into groups of similar styles and use the outer text box dimensions to visually place them into a sentence again.

“Lt amet, consectetur adipiscing elit”

would be be broken into three text layers so you can make each section bold, normal, etc...

Lt amet,

consectetur

adipiscing elit

Votes

Translate

Translate
Advocate ,
Sep 28, 2016 Sep 28, 2016

Copy link to clipboard

Copied

Unfortunately ExtendScript still does not support per character styles. The only workaround would be to split the text into groups of similar styles and use the outer text box dimensions to visually place them into a sentence again.

“Lt amet, consectetur adipiscing elit”

would be be broken into three text layers so you can make each section bold, normal, etc...

Lt amet,

consectetur

adipiscing elit

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
Enthusiast ,
Sep 28, 2016 Sep 28, 2016

Copy link to clipboard

Copied

There are some less than ideal options if you want to do this while retaining the text spacing without manual intervention:

- create two layers with the same text but different styles, then use Opacity on Text Animators to hide the unwanted words.

- similar to this, in my pt_ImportSubtitles script I use Skew and Stroke Text Animator properties to replicate italic and bold characters on a single text layer.

Otherwise you'd have to create the text layers separately then use sourceRectAtTime to find the resulting layer boundaries and attempt to lay them out correctly but I doubt that would turn out very well.

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 ,
Mar 16, 2018 Mar 16, 2018

Copy link to clipboard

Copied

Hi Paul. Thank you for at least SOME solution to our problem. Please describe more how to do this... I'm even ready to pay you for this answer.

How to detect "Projekt" word by sourceRectAtTime:

Definition des Begriffs  Projekt  unter PRIN® lautet wie folgt:

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 ,
Mar 16, 2018 Mar 16, 2018

Copy link to clipboard

Copied

LATEST

Wow!!! I got your idea... trying to repeat that by script... I hope all parameter will work and supported my script: Skew, Offset, Fill, Stroke Color and Stroke Width in Text layer.

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 ,
Oct 12, 2016 Oct 12, 2016

Copy link to clipboard

Copied

Alright thanks. Having multiple textboxes is a good suggestion, but doesn't work in this case has it has to support paragraphs, but  thanks for the support.

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 ,
Mar 16, 2018 Mar 16, 2018

Copy link to clipboard

Copied

I also need this feature!!!! Adobe Dev Team!!! PLEASE implement this feature ASAP in next update.

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