Simplify ET/BT handling by keeping track of the current state. This change cause multiple calls to [begin|end]TextMode but only the minimum number of ET/BT commands are written.