Tests of Preformatted Text

NOTE: Explanatory text is not preformatted.

Monospaced Font Test

A "proportional" font has different characters taking different spacings according to their width, so that, for example, "M" takes up more space than "l". This is the kind of font generally used in magazine articles because it gives a more "professional" look.

A "monospaced" font has every character taking up the same width, like typing on an old typewriter or printing on an old dot-matrix printer in draft mode. This is useful for certain kinds of tabular data and for "ASCII art" where images are formed by arrangements of characters.

If something was created to be viewed with a monospaced font, using a proportional font may mess it up. Columns of figures, for example, may not line up right. Or ASCII art figures may be jumbled. In general, it is best to view preformatted text (delimited by the HTML tags <PRE> and </pre>) and text files (*.txt as opposed to *.html) in a monospaced font.

Below is a test of your display font. If you are set up for a monospaced font, the columns of type should form a neat rectangle, with vertical lines of the "|" character alternating with the phrase (reading vertically) "10 Wild Miles!". And the columns of asterisks on the left and right sides should line up.

The phrase "10 Wild Miles!" was chosen because it contains characters likely to be of very different widths in proportional fonts. Thus viewing this in a proportional font will show a worst-case messed-up design.

Preformatted text should also preserve the original line breaks. If line breaks are not preserved, the design will probably be completely incomprehensible.

*....................................................*
*.............|1|1|1|1|1|1|1|1|1|1|1|1|1|............*
*.............|0|0|0|0|0|0|0|0|0|0|0|0|0|............*
*.............| | | | | | | | | | | | | |............*
*.............|W|W|W|W|W|W|W|W|W|W|W|W|W|............*
*.............|i|i|i|i|i|i|i|i|i|i|i|i|i|............*
*.............|l|l|l|l|l|l|l|l|l|l|l|l|l|............*
*.............|d|d|d|d|d|d|d|d|d|d|d|d|d|............*
*.............| | | | | | | | | | | | | |............*
*.............|M|M|M|M|M|M|M|M|M|M|M|M|M|............*
*.............|i|i|i|i|i|i|i|i|i|i|i|i|i|............*
*.............|l|l|l|l|l|l|l|l|l|l|l|l|l|............*
*.............|e|e|e|e|e|e|e|e|e|e|e|e|e|............*
*.............|s|s|s|s|s|s|s|s|s|s|s|s|s|............*
*.............|!|!|!|!|!|!|!|!|!|!|!|!|!|............*
*....................................................*

Multiple-space Test

In normal html the browser reformats the text, trimming any multiple spaces down to a single space. Paragraphs are also reformatted to match the viewer's screen width, disregarding the original line breaks.

Although this may be good for most text, it can mess up tabular data, ASCII art, and other special cases. Thus text files, and preformatted sections of html files, should not have multiple spaces stripped or paragraphs reformatted.

If line breaks and multiple spaces are properly preserved in the test below, you should see a hollow rectangle with an X design in the middle, sort of like a Confederate battle flag hanging vertically. If spaces are stripped to a single space you'll probably see something more like vertical stripes instead of the X. If it gets reformatted like a paragraph of text, the design will probably appear to be complete nonsense.

*************************
*************************
****                 ****
**** *             * ****
****  *           *  ****
****   *         *   ****
****    *       *    ****
****     *     *     ****
****      *   *      ****
****       * *       ****
****        *        ****
****       * *       ****
****      *   *      ****
****     *     *     ****
****    *       *    ****
****   *         *   ****
****  *           *  ****
**** *             * ****
****                 ****
*************************
*************************
These tests designed by Tom Digby (bubbles@well.sf.ca.us) Apr 18, 1995.

About the Author

(40k GIF)

This page was created by Tom Digby and is copyrighted with a fairly liberal "fair use" policy.

Email = bubbles@well.sf.ca.us

Home Page = http://www.well.com/user/bubbles/