Access to kerning classes

RoboFont Forums Help / General Access to kerning classes

This topic contains 1 reply, has 2 voices, and was last updated by  frederik 7 years, 8 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #5404

    joanca
    Participant

    >>>f.kerning.asDict()
    >>>{(‘@MMK_L_f’, ‘@MMK_R_o’): -55}

    How can I read-write the kerning classes via scripting? I couldn’t find the way with robofab.
    I’d like to be able to know which glyphs are in the class and modify it.
    thanks.

    #5405

    frederik
    Keymaster

    The kerning keys can be either glyph names or group names.
    If they are group names (starting with an ‘@’) you can edit them in with the groups objects

    f = CurrentFont()
    f.groups["@MMK_L_f"]
    

    Its possible that this group isn’t not in your groups but already hard coded into the features.
    (normally MM is adding those kerning groups also as font.groups items

    note:
    RoboFont does not automically convert font.groups to feature groups.
    Use this extension for converting and adding groups to the feature file: https://github.com/typemytype/RoboFontExtensions/tree/master/groups2Features

    good luck

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.