Options

Addressing Byte Alignment Issues in fontTools When Creating TrueType Fonts

Is it possible to add padding to the 'glyf' using the current version of fontTools? I have managed to retrieve and manipulate data using the 'compile' method of the Glyph class, but had to give up due to the absence of a 'decompile' method. Could I be overlooking something?

I am attempting to use fontTools to create a font with a 'loca' table in the Short version structure. During this process, I have noticed that the 'glyf' data, once compiled by fontTools, does not adhere to a 2-byte boundary. I have also referenced an Issue that discusses this aspect: https://github.com/fonttools/fonttools/issues/203.

My aim is to create TrueType fonts that are easily manageable with Type 42 Embedded fonts. The Adobe document 5012.Type42_Spec.pdf, section 4.2, specifies that PostScript strings must align to 4 bytes and begin on a font table boundary, or for glyph data, they should align to 2 bytes and start on a glyph boundary.

Any suggestions or best practices would be greatly appreciated.
Sign In or Register to comment.