More improvements to multi-line optimal sizing