Text this: Line routing algorithm