Fontlab Kern Feature

I'm generating a .otf font from FontLab with a MetricsMachine .fea file I've imported. It works in the OpenType Preview panel as a feature, works fine, all kerning is present but when I generate an .otf for testing somehow the kerning isn't included (I've opened the generated .otf back into FontLab and it includes no kerning of any kind).

I'm used to generating .otf font files with FontLab group kerning which includes the OpenType kern feature, but this is different.

Any reason why this could be happening? The font has other OpenType features which should trigger the kern feature to work, and I've tried different Preference options like 'Export old-style non-OpenType "kern" table' and still nothing is working. No compiling errors either. Not sure why it's being so difficult.

Comments

  • Where's Mark Simonson when you need him?
  • Are you importing the kern feature in such a way that it appears in the OT Panel? It should. Assuming that, make sure you don't let FontLab update the kern feature when you generate your font when it suggests it.

    (Frankly, I'm a little rusty when it comes to working and generating fonts with FontLab. I haven't done it routinely since early last year.)
  • Ramiro Espinoza
    Ramiro Espinoza Posts: 839
    edited October 2015
    The best way to import / export kerning between MetricsMachine and Fontlab is the script KERN Exchange FL/MM by www.github.com/typedev
    It would just import the kerning from the MM's UFO (using the script), then Tools > Kerning Assistance > Update [kern] feature and then generate the font with the option Generate OpenType "kern" feature activated. If it does not work, I would just look for mistakes in the classes. 
  • It should be no problem to import the MetricsMachine fea file and generate a working font. As Mark Simonson says – make sure that FontLab does not “update” your kern feature. Here are the preferences that we use:

  • Michael Jarboe
    Michael Jarboe Posts: 265
    edited October 2015
    All this stuff seems to check out, it's really strange it seems that kerning just doesn't want to show up or work when it's the OpenType only feature. I think in one instance I have it working and in another kerning only shows up if I 'Export old-style non-OpenType "kern" table. (and with those differences the OpenType font feature and groups on both fonts is exactly the same as the other) It's acting really glitchy/strange, but maybe there's something I'm simply overlooking somehow.
  • Is it your only feature? There's this thing with Adobe apps (or used to be) where you had to have at least two features for features to work.
  • Michael Jarboe
    Michael Jarboe Posts: 265
    edited October 2015
    Yeah there's multiple features.

    Where it's really strange is I have the 'Regular' weight .vfb that has only the OpenType kerning feature in question among the other features and if I export an .otf it is fine the kerning shows even with the Preferences like Paul suggests above.

    Now if I duplicate that .vfb and change the naming metadata to 'Thin' and export an .otf I can access this new 'Thin' weight (even though it's really just all the Regular weight glyphs, only naming has changed) and the kerning shows up.

    If I cut and paste all the glyphs from the actual 'Thin' .vfb into the latter .vfb (so the font will actually have the Thin weight glyphs) I get a 'Current font contains original OpenType tables. If you continue with the operation this data will be removed'. When I do this and export a .otf the kerning is gone and all the OpenType features are gone even though they are still there in the .vfb OpenType panel (along with all the relevant kerning and opentype classes in the classes panel) and compiling the OpenType features works with no errors and kerning shows up in the OpenType Preview panel. It just disappears when generating an .otf which I don't get?

    I've never experienced this before.
  • Michael Jarboe
    Michael Jarboe Posts: 265
    edited October 2015
    Something similar is happening in Robofont where my Regular weight .ufo is fine kerning and features work on export and in the preview panel.

    With my Thin weight it has all the same features as Regular, and uses the same kerning, but even exporting the kerning from MetricsMachine and 'inserting in font' the kerning won't show up in the preview panel and won't show up when the font is generated.

    In general as well with Robofont I can't get the kerning to work if it is actually inserted in the OpenType feature panel in Robofont. It only works if it's 'inserted into font' from MetricsMachine, leaving the other OT features separate in the OpenType feature panel.
  • Michael Jarboe
    Michael Jarboe Posts: 265
    edited October 2015
    All I'm really trying to do is integrate MetricsMachine into my workflow (from previously using only FontLab for kerning/groups) and in this situation the different .ufos and .vfbs are using the same groups and kerning, it's just being really difficult.

    It really seems it would be as simple as cutting/pasting these features, but it's not working like that.

    I also wanted to stop exporting the old non-OpenType kerning tables and just use the pure OpenType kern feature. Trying not to use the FontLab MetricsMachine exchange macro because I don't want to worry about key glyphs and want to be free from any FontLab restraint and just work with the OpenType .fea file instead.
  • Maybe there's something corrupt on the glyph level.

    I tried another test, duplicated regular.ufo which works fine on all levels, renamed it thin.ufo, opened it in Robofont all the kerning features etc. check out all looks good. 

    Went in, changed the naming to update to 'Thin', opened an earlier version of Thin simply to get all the thin glyphs, cut and paste all the thin glyphs.

    At this point for all intents and purposes my thin.ufo is the exact same as the working regular.ufo except the naming and glyphs are updated. Kerning and features still show they are working in the preview panels etc.

    Once I generate an .otf though in testing none of the OpenType features or kerning show up or are active.
  • Well, everythings working now, I'm not sure what I did, but I did it all through Robofont. I guess for now my workflow will be to use MetricsMachine and Robofont at the last stages. Strange stuff.
  • PabloImpallari
    PabloImpallari Posts: 804
    edited October 2015
  • Alif Fahman
    Alif Fahman Posts: 5
    edited June 2016
    Thanks all for the info.