From 037edd44175be99bd9f275e55d6b334aed51212c Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Thu, 25 Oct 2001 12:25:13 +0000 Subject: 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] --- misc.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/misc.c b/misc.c index 41d7e38..7a1c59d 100644 --- a/misc.c +++ b/misc.c @@ -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; -- cgit v1.1