diff options
| author | Simon Tatham <anakin@pobox.com> | 2001-10-25 12:25:13 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2001-10-25 12:25:13 +0000 |
| commit | 037edd44175be99bd9f275e55d6b334aed51212c (patch) | |
| tree | 9d286cfeb602356cdd0f08f0018a9b4c1086f332 /misc.c | |
| parent | 4b8298581217a1928e739bb99afc9a4a65189569 (diff) | |
| download | halibut-037edd44175be99bd9f275e55d6b334aed51212c.zip halibut-037edd44175be99bd9f275e55d6b334aed51212c.tar.gz halibut-037edd44175be99bd9f275e55d6b334aed51212c.tar.bz2 halibut-037edd44175be99bd9f275e55d6b334aed51212c.tar.xz | |
Remove the penalty for leaving the last word in a paragraph alone on
its line. Real typesetters in practice don't appear to care much
about this, and the lengths the algorithm has to go to to avoid it
tend to end up looking even uglier.
[originally from svn r1322]
Diffstat (limited to 'misc.c')
| -rw-r--r-- | misc.c | 9 |
1 files changed, 2 insertions, 7 deletions
@@ -236,14 +236,9 @@ wrappedline *wrap_para(word *text, int width, int subsequentwidth, /* * Special case: if we're at the very end of the * paragraph, we don't score penalty points for the - * white space left on the line, unless the line - * contains no spaces (widow penalty). The widow - * penalty is the square of 1/4 the line width. + * white space left on the line. */ - if (seenspace) - cost = 0; - else - cost = (thiswidth/4)*(thiswidth/4); + cost = 0; } else { cost = (thiswidth-linelen) * (thiswidth-linelen); cost += wrapwords[i+j].cost; |