Improve TT font program parser

Needed for #2956.