When you disassemble and assemble TrueType instruction with fontTools, under some circumstances the code gets mangled and thus the TT instructions become invalid.
When I go from the font to XML and back via ttx, everything works fine.
But when I disassemble and assemble the program from a glyph like this:
glyf = font["glyf"]
for name in glyf.keys():
glyph = glyf[name]
if hasattr(glyph, "program"):
asm = glyph.program.getAssembly()
p = fontTools.ttLib.tables.ttProgram.Program()
glyph.program = p
and save the font and dump it to XML again, the effect is that the white space between consecutive numerical values is stripped:
PUSHW[ ] /* 2 values pushed */
PUSHW[ ] /* 1 values pushed */
which not the expected result ;)
Likewise the test at the end of ttProgram.py returns False, which I think is also not intended.