Highlighted

source text leading with expressions <style.setLeading(value)> impossible?

Explorer ,
Apr 12, 2020

Copy link to clipboard

Copied

Hi there,

So I have this simple expression applied to a clean text layer with nothing else on it.

It compiles with no errors but it's just not changing the leading of the text.

style.setLeading(-100)

I tried JavaScript and Legacy Extendscript as well and nothing works. Cleaned cache, rebooted..nothing.

Any ideas? Much appreciate it...

Cheers

 

Adobe Community Professional
Correct answer by Rick Gerard | Adobe Community Professional

Your expression will work if you turn off auto leading. You could turn it off in the expression so it would not matter if you remembered to change it in the Character Panel.

 

Here is the way to make setting the leading work every time:

 

style.setAutoLeading(false).setLeading(-100);

 

 

TOPICS
Error or problem, Expressions, How to, Scripting

Views

355

Likes

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

source text leading with expressions <style.setLeading(value)> impossible?

Explorer ,
Apr 12, 2020

Copy link to clipboard

Copied

Hi there,

So I have this simple expression applied to a clean text layer with nothing else on it.

It compiles with no errors but it's just not changing the leading of the text.

style.setLeading(-100)

I tried JavaScript and Legacy Extendscript as well and nothing works. Cleaned cache, rebooted..nothing.

Any ideas? Much appreciate it...

Cheers

 

Adobe Community Professional
Correct answer by Rick Gerard | Adobe Community Professional

Your expression will work if you turn off auto leading. You could turn it off in the expression so it would not matter if you remembered to change it in the Character Panel.

 

Here is the way to make setting the leading work every time:

 

style.setAutoLeading(false).setLeading(-100);

 

 

TOPICS
Error or problem, Expressions, How to, Scripting

Views

356

Likes

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
Apr 12, 2020 0
Adobe Community Professional ,
Apr 12, 2020

Copy link to clipboard

Copied

Your expression will work if you turn off auto leading. You could turn it off in the expression so it would not matter if you remembered to change it in the Character Panel.

 

Here is the way to make setting the leading work every time:

 

style.setAutoLeading(false).setLeading(-100);

 

 

Likes

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
Reply
Loading...
Apr 12, 2020 1
efikrd LATEST
Explorer ,
Apr 13, 2020

Copy link to clipboard

Copied

Thank you so much!!! Finally working... 🙂

 

Likes

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
Reply
Loading...
Apr 13, 2020 0