home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 December
/
simtel1292_SIMTEL_1292_Walnut_Creek.iso
/
msdos
/
laser
/
fntview3.arc
/
FONTVIEW.DOC
< prev
next >
Wrap
Text File
|
1988-06-19
|
24KB
|
450 lines
FONTVIEW Documentation
(Version 3.0)
June 19, 1988
FONTVIEW is
Copyright (c) 1988
by
S.H. Moody & Associates, Inc.
1810 Fair Oaks Ave.
South Pasadena, CA 91030
All Rights Reserved.
FONTVIEW reads HP-specification LaserJet downloadable PORTRAIT or
LANDSCAPE orientation font files and displays the magnified characters
in the file on your EGA screen in increasing ASCII order. You must
have an EGA display card installed in your computer for FONTVIEW to
function.
FONTVIEW automatically magnifies the font character images as
much as possible while retaining the font's original horizontal and
vertical proportions on the screen. User options include manually
setting X and Y magnifications, setting the display time of each
character before proceeding to the next character, and overriding the
default grid-like display to instead display characters as solid
figures.
FONTVIEW and the accompanying FNTCLEAN are not free, but
Shareware. If you find FONTVIEW or FNTCLEAN useful, you are requested
to forward $17.00 to the above address to register your copy and
receive two useful additional font programs (see REGISTRATION, below).
USING FONTVIEW
The syntax for running FONTVIEW is:
FONTVIEW fontfile.ext [/S] [/Mx,y]
Where the parameters in brackets are optional and may be omitted
from the command line.
"fontfile.ext" is the complete name of the font file you
wish to view. DOS paths are supported if you are using DOS
2.0 or higher.
/S tells FONTVIEW to display solid characters on the
screen. The default for the program ( no "/S") is to
display characters using a dot plot shape which includes a
background-colored line on the top and right sides to allow
you to clearly distinguish the individual dots forming the
character.
/Mx,y allows you to manually set the screen magnification
in the X and Y directions instead of having FONTVIEW
determine these values. The values to substitute for "x"
and "y" specify the amount of magnification to use in the
direction indicated. For example, /M9,6 tells FONTVIEW
to display 9 dots horizontally on the screen for each
horizontal dot in the font file, and 6 dots vertically for
each vertical dot in the font file.
After FONTVIEW displays a character, pressing any key causes the
program to proceed to the next character. All characters are
displayed in increasing ASCII order, regardless of their order in the
font file. If you want to view all the characters in a file without
manual intervention, you can hit any of the numbers between 0 and 9
and FONTVIEW will display a character, pause for the number of seconds
you have input, and proceed to the next character. To shut this
"auto-display" feature off once it has begun, merely hit any non-
numerical character and FONTVIEW will again await a keystroke before
proceeding to the next character. To change the amount of delay
between the display of characters, just press a different numerical
value and the program will use the new value after the next character
display.
To view a particular character in a font file, press "E" or "e"
(for ENTER Character) and at the lower left corner of the screen the
program will prompt you to enter the character from the keyboard. To
view characters not on the keyboard, press and hold down the ALT key
while entering the character's ASCII number from the NUMERIC KEYPAD,
then release the ALT key. The screen will display the appropriate
character. Following the display of the character, FONTVIEW will
resume its display sequence order beginning with the character with
the next higher ASCII number. If you change your mind after pressing
"E", merely hit RETURN without entering a number and FONTVIEW will
resume its display sequence from where it left off. If you enter a
character or ASCII number of a character which is not in the font
file, FONTVIEW will beep, display "NOT THERE. TRY AGAIN" for two
seconds then prompt you to "Enter Character" again, all in the lower
left hand corner of the screen.
To exit FONTVIEW, hit the Escape key and you will exit after the
next character has been displayed. Upon exiting, FONTVIEW will
display the LaserJet escape code sequence to use to call the font into
use after it has been downloaded.
To check that FONTVIEW is compatible with your hardware, I
suggest you first try FONTVIEW on a file which is known to be
specified correctly. The file DEMO.SF2 (included in this archive) is
a twelve character (6 portrait, 6 landscape) font file which will
establish that your hardware is suitable. Type FONTVIEW DEMO.SF2 to
display the 6 characters ("A", "B", "W", "p", "x" and "y"), first in
landscape, then in portrait orientation. DEMO.SF2 is not a valid
LaserJet font file since it contains a mixture of portrait and
landscape characters. The landscape characters are stored in the file
as ASCII characters 1-6 and so appear first in the display sequence.
THE FONTVIEW DISPLAY SCREEN
The display window is divided into two elements: a text portion
along the left side, and a graphics window occupying the rest of the
screen.
THE GRAPHICS WINDOW
Inside the graphics window you'll see a magenta rectangle within
which the magnified character is displayed. This rectangle, or cell,
displays the boundaries within which all characters in the font
normally fit. Also shown within this font cell are two horizontal
lines. The lower, solid line is the baseline which is the bottom row
of dots for most characters. For example, the bottom of the "A", "B",
and "x" of DEMO.SF2 coincide with the baseline. Descenders fall below
this baseline. In many fonts (particularly the larger fonts) the
bottom of the "C", "G", "O" and others extend up to a few dots below
the baseline to improve their attractiveness. The second, dotted line
shown in the cell is the "x-height" line. The top of the lower case
"x" should coincide with the x-height line while the bottom of the
letter coincides with the baseline. The x-height is generally the top
of lower-case characters except for those with ascenders ("b", "d",
etc.), however, again in many typefaces the top of the "c" and "o" and
the top of the loops in "b", "d", "p" and others often extend 1-3 dots
above the x-height line to improve their appearance.
Finally, and most important, the magnified character is dis-
played. Characters are placed within the character cell using the
"left offset" value stored in the character header unless the left
offset value is 0 or negative.
THE TEXT WINDOW
The left, text portion of the screen presents data found in the
font and character headers. HP-specification laserjet soft fonts are
comprised of three types of data: first is the FONT header, which
contains information for the font as a whole; second are CHARACTER
headers (one for each character) which contain width, height, and
spacing information for each character; and finally, the bit image
data for the character.
FONT DATA
The top portion of the text portion of the screen displays a
portion of the font header information. This information is displayed
once for each font, and thus will not change as you view each
character.
The first line shows the DOS filename of the font which you
entered on the command line.
The second line shows the name of the font if it is included in
the header. Often, particularly with shareware fonts, this
information is not included so nothing will appear after "NAME:" on
this line.
The third line shows the typeface (Times Roman, Helvetica,
Optima, Garamond, etc.). This information is decoded from the font
header. HP has assigned codes for over 20 typefaces, which I have
incorporated into FONTVIEW. Nonetheless, many soft fonts put a code
value in the header which FONTVIEW does not recognize. in this case,
"UNKNOWN" will appear on this line.
The fourth line Shows the orientation of the font, either
"Portrait" or "Landscape".
The fifth line shows the spacing of the font and should be either
"Fixed", or "Proportional".
The sixth line shows the symbol set of the font, which identifies
which character set the font is using (USASCII, PC-8, HP Roman
Extensions, etc.). Again, HP has assigned codes for over 30 such
sets, which are included in FONTVIEW, but if the font maker uses a
code which is not recognized, the word "UNKNOWN" will appear on this
line.
The seventh line, "Points", shows the height of the font, in HP
points. HP fonts are defined based on 72 points per inch, as opposed
to the standard printer's point which is 1/12 of a Pica or 72.27 per
inch. The body size of a font, in points, is the vertical distance
measured from the bottom of a descender, such as the stem of a "p" to
the top of an ascender, such as the stem of a "b". To convert points
to 300 dots/inch dots, multiply by 4.167.
The eighth line, "Default Pitch" shows the horizontal spacing of
characters in a font in characters per inch. A 12 pitch font prints
12 characters per inch. Actually the default pitch figure defines
character spacing only for fixed spaced fonts. For proportionally
spaced fonts the figure displayed is the reciprocal of the width of
space character. For example a default pitch of 27.27, as in the
DEMO.SF2 file, means that 27.27 spaces will fit in one horizontal
inch. The width of the individual characters of a proportional font
is shown on the lower part of the screen under CHARACTER DATA.
The ninth and tenth lines show the dimensions of the font's cell,
in HP dots. Since HP uses 300 dots per inch in their font specifica-
tions, dividing the displayed cell dimensions by 300 will provide you
the physical dimensions of the cell. For example, if the cell width
is 41 dots, it is 41/300 = 0.137 inches wide. These dimensions are
used to draw the cell on the graphics portion of the screen.
The eleventh line, "BaseLine dst" shows the distance from the top
of the cell to the baseline, in dots. This value is used to position
the baseline in the FONTVIEW graphics window.
The twelfth line, "x" height displays the distance, in dots, from
the baseline to the x-height line, as described earlier. Many
shareware fonts leave this field blank; and, if this has been done, no
x-height line will appear in the FONTVIEW graphics window.
The final, thirteenth line of the font data area shows the dot
magnification used by FONTVIEW to display the font characters. As
discussed earlier, an X-magnification of 9 means that 9 dots are
displayed horizontally, for each single horizontal dot printed by
your laserjet printer. The true physical magnification, naturally
depends on the size of your screen. For my NEC Multisynch monitor,
with a horizontal image of about 10 inches and vertical image of
about 8 inches, the overall image magnification is about 4.7 times
the X-magnification shown. Thus, for a horizontal dot magnification
of 9, the actual physical magnification is 4.7 * 9 or about 42:1.
Similarly, the vertical magnification is about 6.9 times the displayed
amount, or 41:1 for a Y-magnification of 6. If the ratio of X-
magnification to Y-magnification is maintained at 3:2, the screen
image aspect ratio (vertical to horizontal proportions) matches the
printer aspect ratio within about 3%. FONTVIEW automatically
maintains this 3:2 ratio unless the font is so large (more than 30
points) that the image cannot fit on the screen. If this occurs, the
program will shift to a one dot:one dot magnification which will allow
fonts of over 60 points to be displayed, although fonts will appear
tall and skinny on the screen due to the distortion in aspect ratio.
Also, at 1:1 magnification, all characters are displayed as solids
since each "display dot" cannot be further reduced in size to produce
the grid-like dot display appearance.
CHARACTER DATA
Below the font data area of the text window is the Character
data. This data changes for each character displayed and is updated
immediately before each character is displayed in the graphics window.
The first line shows the ASCII number of the character. To the
right of this, in parenthesis, is the EGA text-mode representation of
the character. Above ASCII 126 this may not match the actual
character shown in the graphics area, because EGA text mode displays
the equivalent of HP's PC-8 symbol set. If your font contains one of
the more than 30 other symbol sets, the characters will not be the
same, particularly above ASCII 127. Nonetheless, the more commonly-
used characters below ASCII 128 should match. If your font contains
characters below ASCII 32, the EGA text mode character may not be
shown in parenthesis since many of these characters are control
characters which would scroll or otherwise distort the screen if
displayed.
The second and third lines show the dot width and height of the
character. The HP LaserJet II technical reference manual indicates
that a character height or width larger than the corresponding
dimension of the cell specified in the font descriptor will invalidate
the character download, although my experience suggests the rule is
somewhat more complex than it appears: for fixed pitch fonts, if the
left offset (see below) plus the character width does not exceed the
cell width, the character is OK; for proportional fonts, if the "delta
X" (discussed below) does not exceed the cell width, it's OK. It is
possible, therefore, for a valid LaserJet character to extend beyond
the right boundary of the graphics cell, although in practice this is
rare. FONTVIEW will beep when it reads a character whose height or
width violates the LaserJet cell rules, but will attempt to display
the character. If FONTVIEW terminates abruptly, immediately following
a beep, it is likely that the character was larger than the cell and
would not fit on the screen at the dot magnification being used.
The fourth line displays the left offset, in dots. This is the
number of dots that the LaserJet printer moves to the right before
printing the character displayed on the screen, and thus is how
character spacing is performed in the printer. Note that this value
is negative for characters which are moved to the left before
printing. FONTVIEW uses the left offset value to position characters
within the graphics screen cell, except that negative values are
ignored for display purposes.
The fifth line shows the top offset, in dots. This is the number
of dots above the baseline at which the top of a character begins.
For example the portrait-orientation "A" in DEMO.SF2 has a character
height of 29 dots and a top offset of 28 dots. This means that the
top of the character begins 28 dots above the baseline. Since the
character is 29 dots high, this results in the bottom of the character
coinciding with the baseline.
The sixth and last line shows the Delta X value in dots. This
is the number of dots the printer moves from where it left off at the
end of the previous character to where it moves after printing the
character being displayed. This Delta X defines the width of a
character on the printer; this is the value which many word
processors include in Width Tables so that they can properly space
text which will use a downloaded font.
TROUBLESHOOTING
If FONTVIEW abruptly terminates before displaying any characters,
it may be that extraneous bytes are contained in the file. Run
FNTCLEAN to clean up the file and then run FONTVIEW on the new file
created.
If FONTVIEW terminates before displaying any characters, and you
are attempting to view a file already processed by FNTCLEAN, recheck
the path and filename you typed in on the command line. Particularly
check that the path exists since I have bombed FONTVIEW many times by
mistyping the path name.
If FONTVIEW terminates in the middle of a file, it may be that
the manual magnification is set too high, or because some character
dot data overflows the "cell" boundary defined in the font header and
cannot fit on the screen. Try running FONTVIEW at reduced
magnification. For example, if the original magnification was 9 by 6
(x-mag, y-mag), try using /M6,4 on the command line. This is the next
lower magnification which preserves the 3:2 x- to y- magnification
ratio which results in correct vertical and horizontal proportions on
the screen.
REGISTRATION
You will soon notice that many shareware and even commercial
fonts don't sit on the baseline. For some unknown reason, many fonts
sit one dot above the baseline, although I've never observed this in a
HP-designed font. This offset does not impair the font's performance
in your Laserjet printer since if all characters are situated one dot
(1/300 inch) too high, it is not noticeable, however it is annoying
when you view the font using FONTVIEW. Also, if the character sits
one dot too high, it is likely the x-height line will appear one dot
too high as well. Furthermore, many font makers do not bother to set
the x-height since it does not affect the font's performance in a
printer. Again, though, it is annoying since the x-height line is
helpful when viewing any lower-case letter in FONTVIEW. Finally,
sometimes a font will contain characters which violate the LaserJet
cell boundary rules or contain dots so far outside the cell that
FONTVIEW bombs.
If you register FONTVIEW and FNTCLEAN, you will receive the
latest versions of the two programs on a diskette, PLUS, you will
receive a copy of the programs FONTFIX and LJROTATE.
FONTFIX, which works on portrait soft fonts, is a very hard-
working program. It has all of the features of FNTCLEAN, plus:
1. Displays the hexadecimal values and interpretation of all 64
bytes of the LaserJet II font header.
2. Displays the HP LaserJet escape sequence which completely
identifies the font and can be used by your word processor
or spreadsheet to designate the font for use, once it has
been downloaded.
3. Sorts its output file by ascending ASCII numbers. Amazing-
ly, I have viewed many font files which do not have their
character data sorted in ASCII order.
4. Has a Command line option to move the Baseline for all
characters Up or Down by a user-selected number of dots.
5. Has a Command line option to set the font's "x-height"
either manually (in dots), or have the program set the font
x-height using data from the lower-case "x" character (ASCII
120) if it is included in the font file.
6. Goes through each character in a font on a bit (pixel)
level, along the top, bottom, left and right edges,
eliminating superfluous rows of dots which are all "off";
then adjusts left offsets, top offsets, character widths and
heights appropriately, and reconstitutes the character. It
then returns to the FONT header, and sets the cell width,
cell height, and baseline distance such that these values
are correct. This results in a font which uses the minimum
number of bytes to fully describe each character, thus
minimizing download time, LaserJet memory requirements, and
disk storage requirements. Several shareware fonts do not
make effective use of top offsets or left offsets. If you
display a font which uses the same height and width for each
character, it is likely that the size of the file can be
reduced. For example, the shareware font LARGEHLW.SFP was
34,773 bytes long originally, but only 16,992 bytes long
after processing by FONTFIX. Naturally, the modified font
performed identically on my LaserJet printer.
LJROTATE creates a LANDSCAPE font from your PORTRAIT font input
or a PORTRAIT font from your LANDSCAPE font. It processes characters
in a manner similar to FONTFIX to set correct cell dimensions, sort
output characters into ascending ASCII order, and minimize the number
of bytes to define each character, then rotates the character. Since
many fonts are available in only one orientation (portrait or
landscape), LJROTATE can be very useful. I now don't bother to
download both orientations of the same font. Instead, I download the
portrait font, set the baseline and x-height with FONTFIX, and then
run LJROTATE to create a landscape font with the correct baseline
distance and x-height.
You may register both FONTVIEW and FNTCLEAN, and receive FONTFIX
and LJROTATE by forwarding $17.00 (California residents add $1.11
sales tax) to:
S.H. Moody & Associates, Inc.
1810 Fair Oaks Ave.
South Pasadena, CA 91030
Please note that you are registering for FONTVIEW so I can
distinguish your order from orders for other products.