Skip to main content
Inspiring
November 8, 2016
Question

Remove Ligatures and Hyphenation in the active document

  • November 8, 2016
  • 2 replies
  • 524 views

Hi,

I wonder if it's possible to remove ligatures and hyphenation attribute in the whole active document (including all the layers)?

I've started with this:

var doc = app.activeDocument;

for (var i = doc.pageItems.length -1; i > -1; i--) {

    var item=doc.pageItems;

    if (item.typename == "TextFrame") {

            changeText(item)

        }

}

function changeText(item) {

    item.textRange.characterAttributes.ligature.false

    }

This topic has been closed for replies.

2 replies

Inspiring
November 17, 2016

Naturally! Thanks! I wonder why I still can't turn off the hyphenation (I remember that being a bug since CS5)...

tpk1982
Legend
November 17, 2016

You need to add..

    item.textRange.characterAttributes.hyphenation=false

tpk1982
Legend
November 8, 2016

    item.textRange.characterAttributes.ligature.false 

to

    item.textRange.characterAttributes.ligature=false