New to Typophile? Accounts are free, and easy to set up.
I’m sure many of you have worked with Morph Input Files. Not so many, I suppose, with Kerning Input Files with one reason being 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 documentation, 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 this mythical Kerning Input File and prints out hex data for a whole kerning table that can be fused into a font with the Font Tools as generic table data. The KIF format is based on the Morph Input File, and should be easy enough for people that ever worked with the MIF itself.
The script is called kiftohex and you can find it with all the details and sample code at https://github.com/grzegorzrolek/kiftohex/.
There are two limitations though. First, the script expects the 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
kerx extended kerning table 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
kern table works well in CoreText on both OS X and iOS. Bug reports and other feedback of course welcome.