[Python-Dev] Re: Where to put wrap_text()?

François Pinard pinard@iro.umontreal.ca
04 Jun 2002 14:34:12 -0400


[Andrew Kuchling]

> On Tue, Jun 04, 2002 at 09:29:51AM -0400, Fran?ois Pinard wrote:
> >[1] Full stops are punctuation ending sentences with two spaces guaranteed.
> >Full stops are defined that way for typography based on fixed width fonts,
> >like when we say "this many characters to a line".

> I don't think this really matters, because I doubt anyone will be
> implementing full justification.

This is an orthogonal matter, unrelated to full stops.  Simultaneous left
and right justification for fixed fonts texts is _not_ to be praised[1].
The real goal of any typographical device, like wrapping, is improving the
legibility of text.  Maybe simultaneous left and right justification is
more "good looking", some would even say "beautiful", but I think it is
considered well known that such simultaneous justification signficiatnly
decreases legibility for fixed width fonts.  If a typographical device
aims beauty instead of legibility, it misses the real goal.

> Left justification is just a matter of inserting newlines at particular
> points, so if the input data has two spaces after punctuation,
> line-breaking won't introduce any errors.

Excellent if it could be done exactly this way.  However, things are not
always that simple.  If a newline is inserted at some point for wrapping
purposes, it is desirable and usual to remove what was whitespace around
that point, so we do not have unwelcome spaces at start of the beginning
line, or spurious trailing whitespace at end of the previous line.  If the
wrapping device otherwise replaces sequences of many spaces by one, it
should be careful at replacing many space by two, in context of full stops.

----------
[1] I think, shudder and horror, that `man' does simultaneous left and right
justification when producing ASCII pages, this is especially bad since
`man' is about documentation to start with.  Of course, when generating
pages for laser printers, with proportional fonts and micro-spacing, things
are pretty different, and _then_ simultaneous left and right justification
makes sense for legibility, if kept within reasonable bounds of course.
I'm almost sure that all of us have seen dubious and unreasonable usages.

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard