Tag - justify text algorithm