Skip to main content
Participating Frequently
February 2, 2024
Answered

Script for turn off ligatures from overall text of an document

  • February 2, 2024
  • 1 reply
  • 337 views

I need a script to turn off ligature, from overall artwork.

ligature should be removed from AW. if the text is area type or open type and all other formats.

This topic has been closed for replies.
Correct answer m1b

Try this:

/**
 * Turn off ligatures in active document.
 * @7111211 m1b
 */
(function () {

    var doc = app.activeDocument,
        textFrames = doc.textFrames;

    for (var i = 0; i < textFrames.length; i++) {
        textFrames[i].textRange.ligature = false;
        textFrames[i].textRange.contextualLigature = false;
        textFrames[i].textRange.discretionaryLigature = false;
    }

})();

1 reply

m1b
Community Expert
m1bCommunity ExpertCorrect answer
Community Expert
February 2, 2024

Try this:

/**
 * Turn off ligatures in active document.
 * @7111211 m1b
 */
(function () {

    var doc = app.activeDocument,
        textFrames = doc.textFrames;

    for (var i = 0; i < textFrames.length; i++) {
        textFrames[i].textRange.ligature = false;
        textFrames[i].textRange.contextualLigature = false;
        textFrames[i].textRange.discretionaryLigature = false;
    }

})();
Kurt Gold
Community Expert
Community Expert
February 2, 2024

That works very well, Mark.

 

Thanks for sharing.