Problem with mekkablue'script : Steal kerning from InDesign

Fixed. Thank you for reporting!

mekkablue
Thank you for your help! — You’re welcome!

Hi everyone,

thanks a lot for your work and effort in those scripts.
I’ve noticed @Meccablue just added a new version of the script. I still have a problem like the one mchinaski had. The macro panel reports:

Extracting kerning from InD doc: prova.indd
Found text: at tr ce de dd da do ag ac Ma AM MA LT UM TA AT
rc ra to od …
Traceback (most recent call last):
File “”, line 98, in
File “”, line 5, in write
UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xc3 in position 14: ordinal not in range(128)

What can I do to fix it?
thanks a lot again!

I think I fixed that one already. Are you sure you are running the latest version?

I think so. I used the last one on github.
The only change I made is to add “CC” after the word Indesign, because it does not recgnize the software otherwise…

Does the InD text contain non-ASCII characters?

To avoid errors, I’ve used the same text mchinaski used (http://typefacts.com/kerningtest). I also deleted all the glyphs I haven’t in my font.

For this script, I recommend to keep the text to normal a-z and A-Z, set your kerning groups and compress kerning, then delete exceptions.

So, no ô, é, ÿ etc., which doesn’t make much sense anyway for this algorithm. I have found that Optical Kerning pretty much fails with quotation marks, so I would leave those out too.

Sorry to insist again. I have the same issues also with a normal a-z A-Z text, without all diacritics and marks.
I noticed also this quote on the panel:

AppleScript Error:
osascript: OpenScripting.framework - scripting addition “/Library/ScriptingAdditions/QXPScriptingAdditions.osax” cannot be used with the current OS because it has no OSAXHandlers entry in its Info.plist.

Extracting kerning from InD doc: prova.indd
Found text: De molorerferem reperatenis doluptatusae dolo beribus quia i…
Traceback (most recent call last):
File “”, line 98, in
File “”, line 5, in write
UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xc3 in position 14: ordinal not in range(128)

Are those two statements related? (many many thanks anyway!!)

Please ignore my last post. QxpScriptingAdditions.osax was a old file from Quark Xpress that had to be removed from my mac, in order to solve the issues.

After that, the error message is:
Extracting kerning from InD doc: prova.indd
Found text: De molorerferem reperatenis doluptatusae dolo beribus quia i…
Traceback (most recent call last):
File “Steal kerning from InDesign.py”, line 98, in
print “Found font: %s” % fontName
File “”, line 5, in write
UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xc3 in position 14: ordinal not in range(128)
End

0xC3 would be the letter Ã.

Unfortunately I don’t have any à character in the text sample, nor in my font.
Anyway, don’t worry, thanks a lot!

hey there, i get this issue from the macro-panel …

Traceback (most recent call last):
File “Steal kerning from InDesign.py”, line 142, in
print " ERROR: Could not set kerning for %s-%s (%i)." % (leftSide, rightSide, kernValue)
NameError: name ‘kernValue’ is not defined

how can i solve this?
thanks!

Thanks for script! Is it work with Cyrillic letters?

It should, but I never tried. Does it not work for you?

Yes, it’s worked! I’ve just renamed cyrillic letters from “uni1234” type to “A-cy”, “Be-cy”, etc. And I have another question, if you have a time to answer. What font size must be set in InDesign when I run script? As I see in InDesign, “optical” kerning increases when I reduce font size, and vice versa. Does it matter for final result?

Just use the size where you like the spacing most. Or where it sues the least kerning/smallest values.

Okay! Thank you very much for advice!

I usually check combinations that should not kern at all, like H-H or n-n, or n-o. And then look for a size where these have zero or close-to-zero optical kerning.

Super happy with the script, great work @mekkablue!

The only issue I am having is with the quotes also. The script cannot parse the kerning value (only one side though) whenever using any of the following: quotedblleft, quotedblright, quoteleft, quoteright, quotedbl, quotesingle, degree.

Any chance to circumvent that limitation?

Thanks!