Re:Knuth and Plass line breaking algorithm in JavaScript
by bramstein on Monday December 06, 2010 @04:00PM
(#1976788)
I would also highly recommend "Digital Typography" by Knuth. It contains a more detailed description of the algorithm as well as many interesting historical and technical chapters on TeX, MetaFont and computer typesetting in general.
http://en.wikipedia.org/wiki/Word_wrap#Knuth.27s_algorithm