SOLVED Metrics Machine - Not able to import .fea file



  • I exported kerning from MM to an external .fea file. Then I imported it back to a new version of the .ufo file and at the beginning I got "Import failed. Invalid Syntax: @kern1.brevecombcy = [brevecomb-cy];" So I clean the .fea file to be sure those lines were fixed, and now despite no having pairs definitions duplicated I get "Import failed. Pair public.kern1.A, public.kern2.O defined more than once."

    There is another way to work in MM with .fea data?


  • admin

    and with a script its super easy:

    # load two fonts
    fontWithKerning = OpenFont()
    fontWithoutKerning = OpenFont()
    
    # clear and update the kerning with data from
    # the font with kerning data
    fontWithoutKerning.kerning.clear()
    fontWithoutKerning.kerning.update(fontWithKerning)
    
    # clear and update the groups with data from
    # the font with kerning data
    fontWithoutKerning.groups.clear()
    fontWithoutKerning.groups.update(fontWithKerning)
    

    enjoy!


  • admin

    I didn't know it was an unreliable format.

    the conversion is a one way street :)



  • Thanks Frederik, I wanted to work with kerning independently from the .ufo, so I thought to have the .fea as main source for the kerning in order to import it every time the .ufo file was updated externally. I didn't know it was an unreliable format.


  • admin

    Its not recommended to use .fea code as exchange format. Going back an forth will lead to data loss.

    Do you still have the kerning as a kerning in a ufo? You can import kerning from other ufo file.