Better and more general text wrapping