Exporting fea file

Nasim Ali
Nasim Ali Posts: 10
edited November 2017 in Font Technology
I work with FontLabs Studio along with VOLT and my colleague uses Glyphs. I'm mostly working on OT Tables that I've worked on in VOLT. So I have a TTF file with features and need a way to export the fea feature file only so he can import that into Glyphs for final output (OTF). Here are ways I've tried

1. Import TTF into FLS5 and export fea -> GSUB works. GPOS throws errors. Probably FLS5 didn't decompile the table well
2. Import TTF into FontForge and export fea -> GSUB works. GPOS doesn't because FF is somehow now exporting the anchor definitions.

Is there a way to get a workable fea file from VOLT's vtl file or the XML dump of the GPOS table from ttx (fonttools)?
Tagged:

Comments

  • John Hudson
    John Hudson Posts: 3,190
    The only really clean path between VOLT's .vtp project and .fea code would be scripted, i.e. something that parses the plain text of the .vtp file and converts to .fea syntax. I am not aware of such a script, but have considered commissioning one several times.

    In the meantime, you could also experiment with opening the compiled TTF in DTL OTMaster and then use the export .fea option. I've not tested this workflow, but its another option along the lines of those you've already tried, and might produce better results.
  • if you can get proper GPOS code from fontForge, just open the .ttf in Glyphs. It should import the anchors and kerning (and if not, it is a bug and I‘ll fix it).

    But it might be faster to just rebuild the anchors in Glyphs directly as it is one of the strong advantages of Glyphs over Volt.
  • Fonts And Layout gives three ways to do this: https://simoncozens.github.io/fonts-and-layout/features.html
  • John Hudson
    John Hudson Posts: 3,190
    But it might be faster to just rebuild the anchors in Glyphs directly as it is one of the strong advantages of Glyphs over Volt.
    I'll tell you if I agree with that after I've tried working with contextual anchors in Glyphs.  :) 

  • FontLab VI Preview (http://fontlab.com ) has a much-improved decompiler for both anchors and FEA code from binary fonts over FontLab Studio 5. So you can open the TTF in FLVI, export it to UFO and open that UFO in Glyphs. 
  • DTL OTMaster also has a good GPOS-to-FEA decompiler. 
  • The only really clean path between VOLT's .vtp project and .fea code would be scripted, i.e. something that parses the plain text of the .vtp file and converts to .fea syntax. I am not aware of such a script, but have considered commissioning one several times.

    In the meantime, you could also experiment with opening the compiled TTF in DTL OTMaster and then use the export .fea option. I've not tested this workflow, but its another option along the lines of those you've already tried, and might produce better results.
    That's exactly what I was planning! To write a small python script for one-way parsing of vtp/vtl -> fea. Fortunately didn't have to go down that road.
    FontLab VI Preview (http://fontlab.com ) has a much-improved decompiler for both anchors and FEA code from binary fonts over FontLab Studio 5. So you can open the TTF in FLVI, export it to UFO and open that UFO in Glyphs. 
    Thank you! I had tried FLVI's preview some 4-5 months back but it seriously messed up one font and crashed twice leaving a corrupt vfb file. Fortunately it is far more stable and saved the day! Decompiles the binary tables much better, just what I needed!
  • if you can get proper GPOS code from fontForge, just open the .ttf in Glyphs. It should import the anchors and kerning (and if not, it is a bug and I‘ll fix it).

    But it might be faster to just rebuild the anchors in Glyphs directly as it is one of the strong advantages of Glyphs over Volt.
    Never thought of this one (especially since a Mac isn't handy at my end). I've now got the fea file from FLVI's preview version (thanks to Adam Twardoch). Glyphs imports and compiles it fine, but in the exported otf the GPOS and glyph classes vanish. Also the glyph names get changed to unicode points as I had previously reported on glyphs forums.

    We have two masters and we are extrapolating the regular and semibold. Is there a way to export all 4 into separate UFO files so I can use FLVI to import them, merge the fea file with each and export otf?
  • Fonts And Layout gives three ways to do this: https://simoncozens.github.io/fonts-and-layout/features.html
    Very interesting! I wish I had come across this one before! I had googled a lot on the same lines but unfortunately the site is probably way down in search results.
  • Hi
    About the few import. 

    Can you explain the problems with the problems in more detail:
    Glyphs imports and compiles it fine, but in the exported otf the GPOS and glyph classes vanish. 
    The GPOS is normally written by Glyphs. So it would be a good idea to import the kerning and mark position to native data. Otherwise it can’t be interpolated. 
    Also the glyph names get changed to unicode points as I had previously reported on glyphs forums. 
    In Glyphs you normally work with "design names". On export those are changed to proper "production" names. You can avoid that by checking the "Use Custom Naming" in Font Info > Other Settings. But normally the uniXXXX names are preferred anyway. Why do you like to avoid them?


  • Hi
    About the few import. 

    Can you explain the problems with the problems in more detail:
    Glyphs imports and compiles it fine, but in the exported otf the GPOS and glyph classes vanish. 
    The GPOS is normally written by Glyphs. So it would be a good idea to import the kerning and mark position to native data. Otherwise it can’t be interpolated. 
    Also the glyph names get changed to unicode points as I had previously reported on glyphs forums. 
    In Glyphs you normally work with "design names". On export those are changed to proper "production" names. You can avoid that by checking the "Use Custom Naming" in Font Info > Other Settings. But normally the uniXXXX names are preferred anyway. Why do you like to avoid them?


    When the exported otf file is opened in glyphs, in the features section, the GPOS instructions are missing. No interpolation for the GPOS data is fine, I'll be fine tuning the mark positioning later on anyway.

    "Custom naming" is checked. But it's still not exporting as intended. uniXXXX names complicate matters in that if I decide to look at the OTcode later I can't identify which characters the code is referring to and I have to look back and forth. I don't know who would prefer 'u005F' over 'underscore'!

    Can I send you the .glyphs and .fea file in message for you to look at?
  • I found my solution. I had used FontCreator years ago when it was very basic and incapable of handling complex Indic scripts or otf. Now it does plus it has the same visual GPOS editing like VOLT. And unlike VOLT it doesn't look like some app from the 90s. Also it can import my vtp files from VOLT.

    I've only played with the interface for only a while now, but if it does well what it advertises, I might as well get this one.
  • SIL’s FontUtils has a ‘volt2fea’ command line tool, no idea how good is it though. FontTools has a ‘voltLib’ now, probably someone can write a feature file exporter on top of it, no idea how good is it as well.