home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frostbyte's 1980s DOS Shareware Collection
/
floppyshareware.zip
/
floppyshareware
/
LUNACY
/
WIDGRF10.ZIP
/
WIDGRAPH.DOC
next >
Wrap
Text File
|
1990-06-24
|
9KB
|
148 lines
24 June 1990
╔═════════════════════════════════════════════════════════════════════════════╗
║ WIDGRAPH (Version 1.00) ║
║ Copyright 1990 by Rufus S. Hendon. All rights reserved. ║
╚═════════════════════════════════════════════════════════════════════════════╝
Word-processing programs require tables showing the widths of the
characters in proportional-spaced fonts that are to be used to print documents
on a Hewlett-Packard LaserJet printer. If the printer driver provided by the
vendor of the word-processing program doesn't include a width table for a
particular font, you have to create it yourself and incorporate it in the
driver in order to enable the program to make use of the font.
For downloadable bitmapped fonts, this isn't a problem, since various
utilities are available that can create width tables by extracting the
information from the file in which the font is stored. Such programs, however,
can't operate on bitmapped fonts contained in cartridges or on the scalable
fonts resident in the LaserJet III or similar fonts provided in cartridge form.
In these cases the widths of the characters must be determined by measurement
of samples of printed output. This is a tedious and error-prone chore.
The purpose of WIDGRAPH is to simplify this task of measuring the widths
of characters. It does this by producing what is in effect a horizontal bar
graph with a separate bar for each character. The length of the bar is
proportional to the width of the character. A system of grid lines on the
graph makes it easy to read off the width of a given character from a scale
that is calibrated in dots, the unit of character width used in width tables
for LaserJet fonts. (One dot = 1/300 inch.)
To use WIDGRAPH to produce a graph for a particular font, you must know
the command that causes the printer to select the font for use. The form of
such a command is illustrated by the following example, which is the command to
select 12-point Normal Upright CG Times with the Roman-8 symbol set ("<Esc>"
represents the Esc character):
<Esc>(8U<Esc>(s1p12v0s0b4101T
When WIDGRAPH is invoked, the font-selection command is specified as the first
or only argument, with "$" substituted for the Esc character. If you wanted to
have WIDGRAPH produce a graph for 12-point Normal Upright CG Times with the
Roman-8 symbol set, you would issue this command:
widgraph $(8U$(s1p12v0s0b4101T
In the graph, the font-selection command is printed at the top of the
first page, to identify the font to which the graph pertains.
The graph itself has vertical grid lines that lead to scales at the top
and the bottom. The interval between grid lines corresponds to one dot of
width. The alternate grid lines are labeled 0, 2, 4, 6, and so on in the
scales. The grid line labeled 18, for example, corresponds to a character
width of 18 dots. The unlabeled grid line between those labeled 16 and 18
corresponds to a width of 17 dots.
For each character, a bar is shown composed of repetitions of the
character. The bar begins at grid line 0; the code for the character is shown
to the left. The bar extends to the grid line that corresponds to the width of
the character in dots. The character "" is printed just to the right of this
grid line. This provides an unambiguous identification of the grid line to be
used to determine the width of the character in those cases in which the bar
may not quite reach the grid line (because of space left blank on the right of
the particular character) and in the case of the space character, for which the
bar is invisible. To ascertain the width of a given character, simply locate
the code for the character in the column at the left of the graph, find the
grid line at the end of the bar that is marked by "", and follow the grid line
up or down to the nearer scale, from which the width can be read off.
If the font-selection command is the only argument given when WIDGRAPH is
invoked, WIDGRAPH itself decides which characters to include in the graph on
the basis of the symbol set specified in the font-selection command. It
distinguishes three cases:
(1) If the symbol set is 0U, 1U, or 15U, only the standard ASCII
characters (codes 32-127) are included.
(2) If the symbol set is 10U or 11U, all characters with codes from 1 to
255 are included.
(3) For any other symbol set, the graph includes the characters with codes
in the ranges 32-127 and 160-255.
This simple scheme works in most cases. However, you can override the
automatic choice of ranges by including additional arguments in the command
that invokes WIDGRAPH. These arguments consist of one or more pairs of
numbers. Each pair specifies a range of characters to be included in the graph
by their codes. The pair 65 90, for example, specifies the uppercase letters
from A (code 65) to Z (code 90); the pair 97 122 specifies the lowercase
letters. If a range comprises only a single character, the code for the
character is repeated to form a pair, e.g. 32 32 to specify the range that
contains only the space character. Up to 10 ranges may be specified in this
way. The following command, for instance, would restrict the graph for
24-point Bold CG Times with the US ASCII symbol set to the space character and
the alphabetic characters:
widgraph $(0U$(s1p24v0s3b4101T 32 32 65 90 97 122
Sometimes the range of codes covered by the graph may include a code that
isn't assigned to a character in the font being processed. In such cases the
bar for that code will have a length of 0, indicated by the fact that the ""
symbol points to the 0 grid line.
With respect to orientation, LaserJet fonts are of two kinds. Some, such
as the scalable fonts resident in the LaserJet III, are neutral: the printer
can print them in either portrait or landscape orientation, in response to the
appropriate command. Others, such as downloadable bitmapped fonts, are
designed to be used in only one of the two possible orientations. Whether the
printer can use orientation-neutral fonts depends on the printer: the LaserJet
III can, whereas the LaserJet Series II can only use fonts with a specific
orientation.
If your printer is capable of printing from the same font in either
orientation and the font for which a graph is to be produced is of the
orientation-neutral type, don't include a specification of orientation in the
font-selection command used as the first or only argument for WIDGRAPH. This
allows WIDGRAPH to select whichever orientation is better for printing the
graph. Portrait orientation will be used for smaller point sizes; for larger
point sizes, WIDGRAPH will switch to landscape orientation in order to keep the
grid lines a legible distance apart.
If, on the other hand, the font can only be used in a particular
orientation, include the orientation specification ("$&l0O" for portrait,
"$&l1O" for landscape) in the font-selection command. This forces WIDGRAPH to
print the graph in that orientation. If, for example, you needed to produce a
width graph for a portrait-orientation 14-point Upright Bold Helv font with the
Roman-8 symbol set contained in a cartridge, you would issue this command:
widgraph $&l0O$(8U$(s1p14v0s3b4T
The largest point size that WIDGRAPH can handle depends on the type of
font. For orientation-neutral fonts or for specifically landscape fonts, the
upper limit is approximately 40 points. For specifically portrait fonts, the
fact that the graph must be printed in portrait orientation imposes a lower
upper limit of approximately 30 points.
-------------------------------------------------------------------------------
Reports of problems with WIDGRAPH and suggestions for its improvement are
welcome. Send them by EASYPLEX (MAIL) to Rufus S. Hendon [73250,2674].
-------------------------------------------------------------------------------
WIDGRAPH is a copyrighted program, and selling it or distributing it for a
fee is prohibited. However, individuals are authorized to make personal use of
the program without charge, and may distribute copies to others provided that
both the program and this documentation are kept together unmodified and no
payment is accepted for such distribution.