summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2001-10-25 12:25:13 +0000
committerSimon Tatham <anakin@pobox.com>2001-10-25 12:25:13 +0000
commit037edd44175be99bd9f275e55d6b334aed51212c (patch)
tree9d286cfeb602356cdd0f08f0018a9b4c1086f332
parent4b8298581217a1928e739bb99afc9a4a65189569 (diff)
downloadhalibut-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]
-rw-r--r--misc.c9
1 files 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;