Skip to main content
Participant
July 8, 2026
Question

Essential Graphics text Leading property

  • July 8, 2026
  • 1 reply
  • 11 views

Hi,
using Essential Graphics, can’t make parametric connection between text size and leading.
I am using this expression in Source Text:
text.sourceText.style.setLeading(text.sourceText.style.fontSize);

Looking for solution to solve that problem.

Thanks.
Tom

    1 reply

    ShiveringCactus
    Community Expert
    Community Expert
    July 8, 2026

    Does this work directly?  Within the EG comp.  I’m not in front of my computer right now so I can’t check the code.

    But assuming it does work, I found that when applying expressions to text layers in essential graphics comps, I needed to create a second text layer and have that read the source text of the original text layer (which idk turn off visibility for).  My assumption was that it was down to the order of operations.  This might help you.

    tgrabarAuthor
    Participant
    July 8, 2026

    Thanks for replying.
    Yes, you are correct. Directly in EG comp it works. But when that EG comp is part of another comp, TextSize and Leading are not connected anymore. 
    Also, in EG comp, when Leading is set to “Auto”, expression throw out last custom value of Leading, even when text size is changed.