What is the preferred method of keeping kerning data in UFO format ?

Should it be stored in kerning.plist file or in Feature.fea file in GPOS table?
Do both create GPOS data or data in kerning.plist is compiled in KERN table? 
The situation is I have generated some kerning data in fea format. But I am editing the font in Fontra which presently only supports kerning in kerning.plist format. Is there any tool to convert between the two formats? 
Tagged:

Best Answer

  • jeremy tribby
    jeremy tribby Posts: 266
    edited April 18 Answer ✓
    they can both compile to GPOS, modern tools dont really use KERN. with .fea you can do contextual kerning and classes, kerning.plist is glyph to glyph only or using groups.plist IIRC. so you can fairly trivially go from plist to .fea but not necessarily the other way around, depending on how complex it is

Answers

  • jeremy tribby
    jeremy tribby Posts: 266
    you could potentially use fontTools.feaLib to read (can't remember if that's the one...) and there are a variety of ways to write kerning.plist includng fontTools.ufoLib and fontParts... I have written using fontParts before, pretty straightforward
  • Kent Lew
    Kent Lew Posts: 983
    IMO, it is preferable (and certainly more common) to maintain kerning data in kerning.plist. Kerning data will often vary between styles/weights of a family. But features are often shared and common within a family. Trying to manage multiple .fea files to accommodate different {kern} features while keeping other features in sync seems unnecessarily troublesome.
    And most graphic font-editing tools don’t read/write kerning data from .fea files for interactive editing. So you’re left to deal with it manually.
    As Jeremy says, modern compilers will take kerning.plist data and compile into GPOS as standard. You would have to jump through hoops these days to get it into a KERN table (and you would have to have a good reason to want this).