Building AAT kerning with a Kerning Input File

I’ve already posted this on Typophile but here it goes. I’m sure many of you have worked with Morph Input Files. Not so many, I suppose, with the so-called Kerning Input Files. One possible reason might be that the file format has never been actually released by Apple, and no apparent support exist in OS X Font Tools. I’ve heard the format itself was once mentioned in Apple’s docs, but it was all redacted afterwards.

I needed to build some state machine kerning for few of my projects, and I was tired of writing it in hex by hand, so I wrote a shell script that does exactly that. It reads an approximation of the mythical Kerning Input File and prints out hex data for a whole kerning table that can be fused into a font with Apple's tools as generic table data. The input syntax is based on the Morph Input File, and should be easy enough for people that ever worked with MIF itself.

There are two gotchas though. First, the script expects state machine kerning only. Dealing with other formats shouldn't be hard to implement, but it's not a priority for me. Second, the recently introduced extended kerning table (kerx) is not yet fully documented, so you get the old kern table for now. Still, this shouldn't be considered an issue, as the old table works well in CoreText on both OS X and iOS.

The script is called kiftohex and you can find it with all the details and sample code at https://github.com/grzegorzrolek/kiftohex/. Hope somebody will find it useful.

Comments

  • Grzegorz RolekGrzegorz Rolek Posts: 22
    edited September 2014
    I moved the whole thing to a new repo and made it build both kerx and ankr tables during the past year. It means you can work with both state machine-based kerning and the new control-point positioning as found in those tables.

    This was before John Jenkins from Apple announced an upcoming update to their Font Tool Suite, a release that I assume will be pushing forward Apple’s new input format for building AAT, the Advanced Typography Input File, or ATIF, which is probably better-suited for the more common use cases. Nevertheless, when it comes to state machines with non-trivial state chains, I still find MIF, or for that matter KIF, often much easier to follow at a glance than ATIF.
Sign In or Register to comment.