Programmatically building an encoding for Fontlab

Primary tabs

2 posts / 0 new
Last post
Matthew Butterick's picture
Joined: 28 Jul 2009 - 3:14pm
Programmatically building an encoding for Fontlab
0

Is there a stable, recommended way of programmatically creating an encoding within Fontlab? That is, instead of loading from an .enc file using encoding.Load(encodingFile), I want to build up the EncodingRecords from various parameters.

Allegedly, the font object contains an encoding object that is a list of EncodingRecords. I've been able to read out the values from an existing encoding but not write them (horrible crashes typically ensue).

The Fontlab python reference is somewhat mysterious on these points.

Obviously, I could work around this by creating an enc file programatically, saving it in a temp location, and then passing that to encoding.Load(). Maybe that is the preferred method, rather than mucking around with lists of EncodingRecords.

Matthew Butterick's picture
Joined: 28 Jul 2009 - 3:14pm
0

Ignore. Creating a temp encoding file and then loading it back in works fine.