In TeXbook (p.30) it is said:
When
\raggedright
has been specified, badness reflects the amount of space at the right margin, instead of the spacing between words.
That is, in ragged-right case, badness is difference between required and actual width (not 100*r^3
). In the following example badness must be stretchability of rightskip (i.e., 2em
), so considering that 1em
is 10pt
, badness must be 20
, but badness 100
is output. Why?
\hbadness=-1 % to report the badness
\raggedright % \rightskip 0pt plus2em \spaceskip.3333em
\def\text{The badness of this line is 1000.}
\setbox0=\hbox{\text}
\hsize=\wd0 \advance\hsize by 2em \noindent\text\break
\bye