word wrap with space support and lines amount correction