Skip to main content
Participant
November 19, 2015
Answered

How do I turn off ligatures in an entire document?

  • November 19, 2015
  • 6 replies
  • 29026 views

I know that I can turn off ligatures in a story or in a paragraph style, but is there a way to universally turn off ligatures?

Please & Thanks!

Correct answer gert verrept

I use this script (made by Kasyan Servetsky)

var myDoc = app.activeDocument;

var myParStyles = myDoc.allParagraphStyles;

for (i = 1; i < myParStyles.length; i++) {

    myParStyles.ligatures = false;

    myParStyles.hyphenation = false;

}

6 replies

Participant
October 11, 2019

This is very easy with a find/change command.

In Find/Change> Find Format>Basic Paragraph tick the ligatures box.

In the Change Format>Basic Paragraph untick the ligatures box. 

Then save the Find/Change so you can run it easily.

This is also a very good way to replace a language (say the document has been built in US English but you want to spell check in UK English) or you want to remove hyphenation from all paragraph style.

Kasyan Servetsky
Legend
September 17, 2019

The script in the 'correct' answer has a mistake which prevents it from working.

Here's a corrected version in case someone is interested:

var scriptName = "Turn off ligatures and hyphenation",
doc;

app.doScript(PreCheck, ScriptLanguage.JAVASCRIPT, undefined, UndoModes.ENTIRE_SCRIPT, "\"" + scriptName + "\" script");

function Main() {
	var doc = app.activeDocument;
	var allParagraphStyles = doc.allParagraphStyles;

	for (i = 1; i < allParagraphStyles.length; i++) {
		allParagraphStyles[i].ligatures = false;
		allParagraphStyles[i].hyphenation = false;
	}
}

function PreCheck() {
	if (app.documents.length == 0) ErrorExit("Please open a document and try again.", true);
	doc = app.activeDocument;
	if (doc.converted) ErrorExit("The current document has been modified by being converted from older version of InDesign. Please save the document and try again.", true);
	if (!doc.saved) ErrorExit("The current document has not been saved since it was created. Please save the document and try again.", true);
	Main();
}

function ErrorExit(error, icon) {
	alert(error, scriptName, icon);
	exit();
}
Inspiring
June 4, 2020

Hi Kasyan,

Thanks a lot for devoting your time and sharing your codes with us. Would you mind asking the difference between the two scripts, except the Precheck and Undo options (just for my knowledge). I think the main code is still the same.

I tried to tweak your code and added a few more lines to it. To my experience, the code is working fine for me. Here is the code, I'm using.

 

var myDoc = app.activeDocument;
var myParaStyles = myDoc.allParagraphStyles;
var myCharStyles = myDoc.allCharacterStyles;
for (i = 1; i < myCharStyles.length; i++) {
         myCharStyles[i].ligatures = true;
         myCharStyles[i].ligatures = false;
}
for (i = 1; i < myParaStyles.length; i++) {
         myParaStyles[i].ligatures = true;
         myParaStyles[i].hyphenation = true;
         myParaStyles[i].ligatures = false;
         myParaStyles[i].hyphenation = false;
}
alert("Ligatures and Hyphenation has been turned OFF!");

 

 

 In addition to this, would it possible to add some more lines to do the following:

1) Turn On "Adobe World Ready Paragraph Composer"

2) Set the Kerning to "Metrics"

I want all the four settings to be applied to all the text in each and every frame in an active document (without selecting anything). The other two settings, Ligature, and Hyphenation to be OFF are working fine.

 

Thanks,

Masood

Inspiring
June 10, 2020

Any suggestions, please.

philippeg78
Participant
October 5, 2017

Or you can also just type the two letters separately and add a space between scaled at 1%. The result is not so bad.
Still, you have to edit every single word.
I did that instead of using the script.

gert verrept
gert verreptCorrect answer
Inspiring
November 20, 2015

I use this script (made by Kasyan Servetsky)

var myDoc = app.activeDocument;

var myParStyles = myDoc.allParagraphStyles;

for (i = 1; i < myParStyles.length; i++) {

    myParStyles.ligatures = false;

    myParStyles.hyphenation = false;

}

Participant
November 20, 2015

Thank you!

Known Participant
February 23, 2016

‌Posting in the InDesign forum, under an existing InDesign question, will give you an InDesign answer.

Perhaps you posted in the wrong forum?


yes, you are right... sorry I got this link when checking "Illustrator ligatures" so my bad on the Google search

but apparently, Adobe says you cannot even turn them off in Illustrator - complete disaster

Willi Adelberger
Community Expert
Community Expert
November 20, 2015

Change your paragraph styles and turn off the ligatures there.

Marvest
Inspiring
November 19, 2015

If I had to do it I would select the whole text (assuming your document is threaded) and turn off ligatures. I'm guessing it also can be done  with a script. We'll see if somebody else here has more ideas.