Description

WrapWords is the low-level line-breaking algorithm, useful if you need more control over the details of the text wrapping process. For most uses, either Wrap or WrapBytes will be sufficient and more convenient.

WrapWords splits a list of words into lines with minimal "raggedness", treating each byte as one unit, accounting for spc units between adjacent words on each line, and attempting to limit lines to lim units. Raggedness is the total error over all lines, where error is the square of the difference of the length of the line and lim. Too-long lines (which only happen when a single word is longer than lim units) have pen penalty units added to the error.

WrapWords is referenced in 0 repositories