Update text_printer.pyw

Some bugs fixed.