2 ms·
On a slightly related note, that naive greedy word wrap algorithm is generally considered aesthetically bad. A better idea is to give spaces at the end of lines
by baddox 15y ago
On a slightly related note, that naive greedy word wrap algorithm is generally considered aesthetically bad. A better idea is to give spaces at the end of lines a superlinear penalty and then minimize the total penalty. See http://en.wikipedia.org/wiki/Word_wrap#Algorithm http://en.wikipedia.org/wiki/Word_wrap#Algorithm.