add writing direction option when reflowing