Welcome to Typophile
Please Sign in.

What's wrong with this FontLab script?

Primary tabs

1 post / 0 new
Knut's picture
Joined: 8 Feb 2017 - 7:59am
What's wrong with this FontLab script?

The attached FontLab script is intended to copy composites from specific, already existing glyphs in the PUA range, into new code points.
This is for a specific application which uses differently encoded fonts on Mac and Windows. Therefore, to make the font platform independent, the script has to make two copies of each PUA glyph, and paste them to different codepoints.

The script works fine as long as it doesn't have to go through the glyph creation process twice in succession. However, when I try to create glyphs for both platforms in one go, the script crashes.

I'm fairly new to scripting in fontLab and to Python in general, so I'm hoping someone here will spot the error pretty fast.
Any further constructive criticism on the code would also be most welcome.