Trouble importing MetricsMachine kern tables to FL

I just kerned my first font in MetricsMachine, then imported the kerned UFO back into FL 5.04. The kerning info didn't show up in the new vfb. I then tried exporting the MetricsMachine kern tables as an AFM and manually importing it into the vfb, but found that all the values had been multiplied by 2.4. (The typeface is drawn at 2400upm.) I've tried this a few times, a few different ways. Can anybody help?


  • James PuckettJames Puckett Posts: 1,688
    edited August 2013
    You cannot usually import class-based UFO kerning to Fontlab. Use MM to export an OpenType kerning feature file and either link to it with an include statement or copy/paste the entire feature.

    The MM manual covers this in more detail.
  • Mark SimonsonMark Simonson Posts: 1,202
    edited August 2013
    You need to export a feature file (.fea) from MM, open it in a text editor, copy and then paste it into your font's kern feature in FontLab, replacing anything that FontLab may have put there. Be careful not to let FontLab "update" it (it will try every time you generate a font). If you need to make changes to your kerning, go back to MM to make the changes. FontLab is now out of the loop with regard to kerning. It can't make changes to the kern feature you pasted in from MM.
  • Thanks, James and Mark! (I did RTFM, btw, but the MM manual's sometimes a bit terse for a guy who needs things spelled out.)
  • I had support for Fontlab style kerning in Glyphs (it converted it when im/exporting an .ufo). Now I have the im/export scripts for Fontlab.
    So you could open the .ufo from MM in Glyphs, save as .glyphs file an import that in FLS. This should give you correct kerning classes in FLS. Of cause nothing holds you back from finishing the font in Glyphs ;)
  • Robofont is also designed to work with Metrics Machine. When you have a font open in Robofont and update kerning in Metrics Machine, Robofont will 'know' and ask you to click an 'update' button, which will add all the new kerning to the font.
  • Well, I tried cutting and pasting from a .fea kerning file into the Add Pairs popup in the metrics window, and I'm afraid it didn't work. I just got a list of seemingly random -1 kerns. Does the .fea file need to be edited in some way before you paste it in? I know it looks quite different from the sample kern pair text in the FL manual illustration.

    I couldn't try linking to the .fea file with an include statement because I don't know what that means. A Python script of some sort?

    I'm sure Robofont and Glyphs would handle this better than FL; I'm sure they handle most things better than FL. Unfortunately, I'm on deadline and can't stop and learn a new app.

    Any ideas?
  • No, you would need to paste the fea file into the OpenType window to create OpenType kerning. Like wise you could add a statement to the OpenType window such as:
    include (myfont.fea);
    and then leave the "myfont.fea" file in the same folder as the vfb file.

    Although I should ask, are you trying to create "flat" kerning from the Metrics Machine file, that is, within the kern table?
  • Georg: I tried loading your import/export scripts into the relevant folders as per your instructions on GitHub and saving my font as a .glyphs file. FL wouldn't open it thru the Open command, and when I tried to use the Glyphs Import macro in FL, I got this:
    Traceback (most recent call last):
      File "", line 11, in ?
    ImportError: No module named Foundation
    Jason: I'm trying to add the MM class kerning to a VFB so I can (a) make trial fonts and proof them, and then (b) send the VFB to the guy who's doing the mastering for me. Thanks for explaining that I was pasting the .fea text into the wrong window. Unfortunately, making an OT kern feature out of the .fea text doesn't seem to be working, either. I get a failure message reading: "[FATAL] invalid token (text was "@)

    Maybe I'll just make it monospaced...
  • Well a fea file should begin with:

    feature kern {

    not an "@" symbol.
  • That's how my fea does begin.

    I'm getting ready to give up on FL completely. Unless someone has a brilliant fix to suggest, I think I'll just import the MM kerning in Glyphs, produce the OTFs in Glyphs, open the OTFs in FL to produce VFBs for mastering, and send them to my mastering guy. That's a big steaming pile of workflow, but I can't think of anything else, and I've got to get these out the door.

    Thanks for your suggestions, everyone. I do appreciate them.
  • Georg SeifertGeorg Seifert Posts: 611
    edited August 2013
    The import script requires FontLab version 5.1.3.
    If you do not jet have it, you could send me the .glyphs file and I convert it for you.
  • James PuckettJames Puckett Posts: 1,688
    Just put the kern feature file into the directory your VFB is in and include the kerning feature file as shown in the attached screenshot.
  • Thanks for your very kind offer, Georg. But I do have FL 5.1.3 on . I'll load it and give it another try.

    And thank you, James for the great screenshot/tutorial.
  • OK, loading FL 5.1.3 enabled me to import .glyphs files. Thanks, Georg.

    On the other hand, I am now unable to export from FL to ufo. I get this:
    Traceback (most recent call last):
      File "", line 12, in 
    ImportError: No module named robofab.glifLib
    What did I do wrong?
  • On the other hand, I am now unable to export from FL to ufo. I get this:
    You need to properly install robofab for python 2.7. There are plenty of explanations around.

    But the better solution would be again using .glyphs files as it properl converts the kerning classes.
  • (are we slowly ramping up from "please, help! what font is this?" to "please, help! how do I make this font?")

  • Thanks very much for the pointer, Georg.

    I thought these questions were appropriate for this forum, David. If I got it wrong, I apologize.
  • Max, don't get me wrong... these questions are of a nature as to be fully appropriate to this forum.

    What I question is the wisdom required to repeatedly need immediate professional help on deadline, like so many "What the font?" -ers do.
  • Wisdom? I've heard of that stuff. If I make it through this project alive, I'll see if I can get some.
Sign In or Register to comment.