From a80b9507ae88c837d5c06d06e4c7bb375d9c8fb1 Mon Sep 17 00:00:00 2001 From: corvid Date: Thu, 13 Sep 2012 15:21:46 +0000 Subject: typos/spelling/a little English --- doc/dw-line-breaking.doc | 66 ++++++++++++++++++++++++------------------------ 1 file changed, 33 insertions(+), 33 deletions(-) (limited to 'doc') diff --git a/doc/dw-line-breaking.doc b/doc/dw-line-breaking.doc index 8e520c62..afebf104 100644 --- a/doc/dw-line-breaking.doc +++ b/doc/dw-line-breaking.doc @@ -6,14 +6,14 @@ Should be incorporated into dw::Textblock.

Introduction

-For the implementation of hyphenation in dillo, not only an +For the implementation of hyphenation in dillo, not only a hyphenation algorithm was implemented, but also, the line breaking was changed to a simple optimization per line. Aside from the improvement by this change per se, an important aspect is the introduction of "penalties". Before this change, dillo put all words into a line which fitted into it; now, a "badness" is calculated for a possible -breakpoint, and the best breakpoint, i. e. the breakoint with the -smallest value for "badness", is choosen. This can be simply refined +breakpoint, and the best breakpoint, i. e. the breakpoint with the +smallest value for "badness", is chosen. This can be simply refined to define "good" and "bad" breakpoints by assigning a "penalty"; the best breakpoint is then the one with the smallest value of "badness + penalty". Details can be found below. @@ -59,7 +59,7 @@ Anyway an interesting reading.

Hyphenation

-Dillo uses the algorithm by Frank Liang, which is described his +Dillo uses the algorithm by Frank Liang, which is described in his doctoral dissertation found at http://www.tug.org/docs/liang/. There is also a description in chapter H ("Hyphenation") of The TEXbook by Donald E. Knuth, Addison-Wesley 1984. @@ -68,14 +68,14 @@ Pattern files can be found at http://www.ctan.org/tex-archive/language/hyphenation. -

Overview over Changes

+

Overview of Changes

Starting with this change, dw/textblock.cc has been split up; anything related to line breaking has been moved into dw/textblock_linebreaking.cc. This will also be done for other aspects like floats. (Better, however, would be a clean logical split.) -An important change relates to the way how lines are added: before, +An important change relates to the way that lines are added: before, dillo would add a line as soon as a new word for this line was added. Now, a line is added not before the last word of this line is known. This has two important implications: @@ -88,8 +88,8 @@ can be calculated simply in a loop. any line. For this reason, in some cases (e. g. in dw::Textblock::sizeRequestImpl) dw::Textblock::showMissingLines is called, which creates temporary lines, which must, under other -circumstances, removed again by dw::Textblock::removeTemporaryLines, -since they have been created based on limited informations, and so +circumstances, be removed again by dw::Textblock::removeTemporaryLines, +since they have been created based on limited information, and so possibly in a wrong way. (See below for details.) @@ -122,18 +122,18 @@ line-breaking: dw::Textblock::Word::origSpace. -In a more mathematical notation, the \f$i\f$th word has got a width +In a more mathematical notation, the \f$i\f$th word has a width \f$w_i\f$ and a space \f$s_i\f$. A break was possible, when there was a space between the two words, -and the first possible break was choosen. +and the first possible break was chosen. With hyphenation, the criteria are refined. Hyphenation should only be used when otherwise line breaking results in very large spaces. We define: @@ -155,8 +155,8 @@ So we need the following values: