Slightly improved line-breaking algorithm.