Stream your text streams into streams of column streams.
Maps lines and columns to character offsets and back.
Get the visual width of a string - the number of columns required to display it
Wrap those words. Show them at what columns to start and stop.
Get the visual width of the widest line in a string - the number of columns required to display it