Problem with mekkablue'script : Steal kerning from InDesign


Glyphs Version 1.4.3 (586). OSX10.9.4

Firstly thank you to Mekkablue (and others) for their scripts always very helpful and appreciated.
I tested your last “Steal kerning from InDesign” script.
I can not get it to work or I do not know.
Here is the error:
Traceback (most recent call last):
File “”, line 64, in
IndexError: list index out of range

When I delete this line 64, I have the message [Applying kerning to: MyFont, Master: Regular] but nothing happens, the kernings were not imported!

Thank you for your help and answers.


You need to make a new document in InDesign. And it must contain the textbox with text in it.


Thank you for your quick response.
I know that, I do that, but it doesn’t work.
Does anyone have the same problem as me?


That line derives family and style name of the font set in InDesign. Could it be the first text box in your InDesign document is empty?


Hi mekkablue and Glyphs team,

I really appreciate all your work improving Glyphs with your scripts. You are awsome.

I tried today your Steal Kerning from InDesign script and it happened the same that happened to Badani. In order to you could check if I am doing the proper process, I made a screencast that you can see at the following link:




The script looks for an app called Adobe InDesign CS6, and it seems like you have a different version. I just uploaded a minor update of the script that looks for any version of InDesign. Please tell me if it works for you.


@Nicolas: Your video is very well done !!
Do you know that you can install more easily and quickly to test your fonts without using FontExplorer? See this tutorial:

@mekkablue: I have CS6 and the script still does not work.


Can you open the InDesign document from which you want to extract the kerning, and run this Python script:

…and tell me what the output is?

UPDATE: I uploaded a new version of the script, it now handles internal errors more graciously, and outputs more status messages. Please re-download and try again.


I have just ------


Thanks Mekkablue.
I tested your new script and now I have no error message but it does not import kerning.
Here is the message:

[Extracting kerning from InD doc:
Found text:
Found font:
Applying kerning to: MyFont, Master: Regular



That means it could not find an open InDesign document.
Which version of InDesign are you running?


Two questions:

  1. What is your setting in System Preferences > Security & Privacy > General > Allow Apps downloaded from:?

  2. Can you run AppleScript Editor (in /Applications/Utilities/), open a new document, copy, paste, and run this:

tell application “InDesign”
{name, version}
end tell

… and tell me what the result is?


ok. My version of Indesign is CS6 8.01
Allow Apps downloaded from: Anywhere
AppleScript > {“Adobe InDesign CS6”, “”}


This message suggests that there is no InD document. Are you double-triple sure that, when you run the Steal Kerning script, there is an InD document currently open? And the document has only one text frame, containing the text with optical kerning?

In the first line there should at least be something like ‘Untitled-1’ or the like.


Yes mekkablue, I’m quadruple-quintuple sure that I do it right.
Whenever I can, I’ll try with a different configuration.


I think I found where the problem is.
I tested the script with Glyphs 2.0, it works well.
Also tested with version 1.4.3. (584) from Georg, it’s ok!
However, it still doesn’t work with version 1.4.3. (586) from the AppStore version.
If it helps you…


Probably because of sandboxing limitations. Then I guess, I cannot do much, script-wise.



I also tried your script and it doesn’t seem to work with quotation marks. Is there a way to fix it? Thanks!

Traceback (most recent call last):
File “Steal kerning from”, line 100, in
ValueError: invalid literal for float(): gle right quotedouble right quote 25


What was your text in the InD text frame?


I’m sorry, I can’t remember which text-file I used.
But i recently pasted this text into my indesign file, and it didn’t worked. This is the message I get from the macro panel:

Extracting kerning from InD doc: Unbenannt-2
Traceback (most recent call last):
File “Steal kerning from”, line 92, in
File “”, line 5, in write
UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xe2 in position 14: ordinal not in range(128)