Resubmission: RTL Kerning Conversion Glyphs 2 to 3

I just gave the new version of the script a try, but all kerning is only LTR and the script does not change anything. No errors. Did I forget anything in the conversion process?


:one: Convert RTL kerning from Glyphs 2 → 3:

:capital_abcd: Master: Regular

:two: Flipping kerning groups for RTL glyphs:

:white_check_mark: Done.

Glyphs 2 RTL Mode:

Glyphs 3 in LTR Mode:

but in RTL:

Which script are you referring to? I have one in my repository (Port Arabic & Hebrew kerning for, but is that it?

I think it’s mine. Can you send me the font? And are you using the latest version of the script?

Hi Rainer,
yes, it’s yours. I have testet directly after your announcement, and downloaded again today. So I think, it is the latest.

Here is the file.

kerning test 3.glyphs (46.5 KB)

By the way, Tosche’s script seems to work well! Is it reliable, Tosche?

Thanks for the file. I think I fixed it now. Uninstall and reinstall through Plugin Manager to obtain the latest version of the mekkablue scripts.


unfortunately, there is no result. Like before. I have downloaded twice and also got the raw script and tested it in the Macro window. My version is 3.0.5 (3109)

What does it say in the macro window?

The same as before:


Can you send me the font you are trying to convert, please?

The script works for me as expected with the font sample you sent me.

I have used the new font info dialog to add the “RTL” information to the RTL-glyhps and bidi to punctuation chatacters before the script conversion at it seems to work now.

But there is still a problem with glyphs with added suffix. These ones will not be converted

(using the nice name instead of unixxxx.001 makes no difference)

Did you define those as RTL as well?

I am pretty sure, I did.

To proof, I ran a new test, but now the script throws an error:

:capital_abcd: Master: Regular
:white_check_mark: @quoteright uni0698.altd 40
:white_check_mark: @quoteright uniFE9B.altd 45
Traceback (most recent call last):
File “Convert RTL Kerning from Glyphs 2 to”, line 144
countKernPairs = copyFrom2to3(masterKerning, RTLMasterKerning, glyph2scriptMapping)
File “Convert RTL Kerning from Glyphs 2 to”, line 85, in copyFrom2to3
kernValue = firstKerning[secondKey]
File “”, line 18, in _getitem__objectForKey
return container_unwrap(res, KeyError, key)
File “”, line 113, in container_unwrap
raise exc_type(*exc_args)
KeyError: ‘2B2C7800-9A98-4C9F-BBB0-97F5F5A6E0C2’

have a similar problem.

a G2 file that has Hebrew kerning (by @danielgrumer and Yanek Iontef).
converted with @Tosche’s Port Arabic & Hebrew kerning for G3 script.
have the Kerning Values listet in the kerning table, but not working in the text preview in glyphs3 nore in the final OTF

( am using G3 to have @TimAhrens’ Kern-On working on LTR scripts but not affecting the RTL script that was kernd manually )

( Daniel and Yanek work in a G2 enviroment )

is there a sopultion for this already?
if not I have to prepare the file to send over as this is a confidential custom font.

This is peculiar. If I manually kern the same pair, I see it in the list as well as preview. There may be something wrong with the script but it’s hard to tell. What happens if you kern dalet and comma now?

In the screenshot, the kerning group @dalet-hb is not on the left side of dalet-hb:

Thanks for your help!

It’s not about this certain pair.
It’s that all RTL kerning is not working (but visible in the tables, after using the script)

Will try Rainer‘s script (that didn‘t worked the last time, so we favored Tosche‘s) maybe with the update it works.

I want to have a look at the source file. Would it be okay to share the files with me?

Hej Toshi,

when converting the old g2 data again (with the same code by you), now it works.
have no idea why it did not worked back then (but surprisingly had displayed values in the kern window but not applied them actually)

anyway, have send your a subsetted version of the files to your @mac adress — just if you are curious to look as the halfway converted LTR kerning.

as your code works work me right now, I’m happy already

Thanks, it’s working for me too. That’s a relief!

Maybe the previous failure has to do with the last script failing? Scripts can behave on a clean slate if you reopen a file or restart the app, depending on the kind of failure.

Am getting closer to the problem:
It’s due to copy&pasted kerning, as I just copied it from the (working) file to another (with improvents on other scripts)

So when in G3 and in RTL mode I can copy kerning (convertde by Tosche’s script) and values will be transferred, but their functionality is broken.

but when kerning from scratch (no g2 converted RTL kerning) the copy&Paste values work…

… Rainer’s script (downloaded minutes ago) is not woking at all

Traceback (most recent call last):
File “Convert RTL Kerning from Glyphs 2 to”, line 156
glyph2scriptMapping = mapGlyphsToScripts(thisFont)
File “Convert RTL Kerning from Glyphs 2 to”, line 143, in mapGlyphsToScripts
exporter.makeKey2Scripts_splitGroups_GroupDict_error(glyph2script, None, {}, None)
AttributeError: ‘GSExportInstanceOperation’ object has no attribute ‘makeKey2Scripts_splitGroups_GroupDict_error

… will gave a fresh look by tomorrow