Vertical kerning doesn't work on Glyphs 3.0.4 (3097)

Cannot set kerning group/value in the grey info area when the writing direction is top-to-bottom. The values are simply discarded when entered.

font = Glyphs.font
master = font.masters[0]
font.setKerningForPair(master, 'he-hira', 'n-hira', -250.0, RTLTTB)

Setting values with the code above did not work either, but

font = Glyphs.font
master = font.masters[0]
he_hira_id = font.glyphs['he-hira'].id
n_hira_id  = font.glyphs['n-hira'].id
font.kerningVertical[][he_hira_id] = {n_hira_id: -250.0}

did work, but still there are two issues:

  1. The glyph position is translated horizontally not vertically
  2. The kerning value is not displayed when the caret is in between

See the screenshot for better illustration. Tested on Glyphs 3.0.4 (3097).

The arguments are called leftKey and rightKey. That means either the glyph ID (as used in the second example) or a class name (like @MM_L_A).

I fixed the horizontal offset

Thank you so much for the fix!

I might be wrong, but the documentation says it accepts glyph names, and the current version of the GlyphsSDK also looks like it does, so I thought that was not the cause of the problem.

The weird thing I encountered was I couldn’t set not only kerning values but also kerning groups via the greyish info area – especially reproducible when any kerning values are not set at all. After I put something and press the Enter key, the text field becomes empty. That seems to happen only for the top-to-bottom mode.

You are right. The names should work. I’ll have a look.

And I have a look at the Info box.

I had a look at the script. The problem is not the names but the direction constants. I changed them to LRT, RTL and VERTICAL (there is no difference with left or right in vertical kerning) (and the first argument is the masterID, not the master)
This will work:

font = Glyphs.font
master = font.masters[0]
font.setKerningForPair(, 'he-hira', 'n-hira', -250.0, VERTICAL) # use 4 for now until the new version is out
1 Like

That’s my bad – somehow I tend to get it wrong when passing around a font master object…thank you so much for taking your time! TTB sounds more consistent and plausible to me at this point considering bottom-to-top scripts like Ogham, but VERTICAL should also work in most cases.

If the Info box issue is not reproducible on your side, I’ll attach a screen recording.

I fixed the info box issues already. Thanks.

1 Like

I appreciate your support. I’ll check when the new build is available!

Confirmed that the issue has been fixed! On a side note, it would be more than perfect if the column header text in the Kerning window could change from Left/Value/Right to Top/Value/Bottom when switched the writing direction (it should give me a clue which mode I’m in), but anyway a huge thanks for the fix!