Skip to main content
Participant
November 19, 2015
Answered

How do I turn off ligatures in an entire document?

  • November 19, 2015
  • 6 replies
  • 29029 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

So I just had an interesting chat with an "Adobe" representative and asked where I turned off the ligatures and it went thusly...

Abhishek: basic character format

Abhishek: -> uncheck ligatures ->ok

Abhishek: You are not following the steps I have mentioned above

Andrew Croft: Your file was successfully uploaded: Screen Shot 2016-02-23 at 3.43.19 PM.png.

Andrew Croft: I did that too and I am telling you it is not there - see the attached screen shot

Andrew Croft: so please show me where it is on the screen I have provided

Andrew Croft: I do not see it anywhere within the style options, this is what I have been saying

Abhishek: let me check again.

Abhishek: Well, in Ai there is no way to disable ligature


is this guy for real?


so, even under "Type" menu -> "Smart Punctuation" there is the option to turn it off - AND THIS DOES NOT WORK AT ALL. AT ALL PERIOD.


What the hell is Adobe doing to Illustrator? Since they put us on subscriptions and shipped all of the programming to a third world country the apps have become virtually useless - there are so many issues in the InDesign Pre-Release discussion group it is just not funny.


What the hell is Adobe doing?


And how can I remove the ligatures from my package design that I have to get out in one hour??????????????????????

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.