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 >
Text File  |  1988-06-19  |  24KB  |  450 lines

  1.  
  2.  
  3.  
  4.  
  5.                               FONTVIEW Documentation
  6.                                   (Version 3.0)
  7.                                   June 19, 1988
  8.  
  9.                                    FONTVIEW is
  10.                                Copyright (c) 1988
  11.                                        by
  12.                           S.H. Moody & Associates, Inc.
  13.                                1810 Fair Oaks Ave.
  14.                             South Pasadena, CA 91030
  15.  
  16.                               All Rights Reserved.
  17.  
  18.  
  19.  
  20.            FONTVIEW reads HP-specification LaserJet downloadable PORTRAIT or
  21.       LANDSCAPE orientation font files and displays the magnified characters
  22.       in the file on your EGA screen in increasing ASCII order.  You must
  23.       have an EGA display card installed in your computer for FONTVIEW to
  24.       function.
  25.  
  26.            FONTVIEW automatically magnifies the font character images as
  27.       much as possible while retaining the font's original horizontal and
  28.       vertical proportions on the screen.  User options include manually
  29.       setting X and Y magnifications, setting the display time of each
  30.       character before proceeding to the next character, and overriding the
  31.       default grid-like display to instead display characters as solid
  32.       figures.
  33.  
  34.            FONTVIEW and the accompanying FNTCLEAN are not free, but
  35.       Shareware.  If you find FONTVIEW or FNTCLEAN useful, you are requested
  36.       to forward $17.00 to the above address to register your copy and
  37.       receive two useful additional font programs (see REGISTRATION, below).
  38.  
  39.  
  40.                                  USING FONTVIEW
  41.  
  42.            The syntax for running FONTVIEW is:
  43.  
  44.                           FONTVIEW  fontfile.ext [/S] [/Mx,y]
  45.  
  46.            Where the parameters in brackets are optional and may be omitted
  47.       from the command line.
  48.  
  49.                 "fontfile.ext" is the complete name of the font file you
  50.                 wish to view.  DOS paths are supported if you are using DOS
  51.                 2.0 or higher.
  52.  
  53.                 /S  tells FONTVIEW to display solid characters on the
  54.                 screen.  The default for the program ( no "/S") is to
  55.                 display characters using a dot plot shape which includes a
  56.                 background-colored line on the top and right sides to allow
  57.                 you to clearly distinguish the individual dots forming the
  58.                 character.
  59.  
  60.                 /Mx,y  allows you to manually set the screen magnification
  61.                 in the X and Y directions instead of having FONTVIEW
  62.  
  63.  
  64.  
  65.                 determine these values.  The values to substitute for "x"
  66.                 and "y" specify the amount of magnification to use in the
  67.                 direction indicated.  For example,  /M9,6  tells FONTVIEW
  68.                 to display 9 dots horizontally on the screen for each
  69.                 horizontal dot in the font file, and 6 dots vertically for
  70.                 each vertical dot in the font file.
  71.  
  72.            After FONTVIEW displays a character, pressing any key causes the
  73.       program to proceed to the next character.  All characters are
  74.       displayed in increasing ASCII order, regardless of their order in the
  75.       font file.  If you want to view all the characters in a file without
  76.       manual intervention, you can hit any of the numbers between 0 and 9
  77.       and FONTVIEW will display a character, pause for the number of seconds
  78.       you have input, and proceed to the next character.  To shut this
  79.       "auto-display" feature off once it has begun, merely hit any non-
  80.       numerical character and FONTVIEW will again await a keystroke before
  81.       proceeding to the next character.  To change the amount of delay
  82.       between the display of characters, just press a different numerical
  83.       value and the program will use the new value after the next character
  84.       display.
  85.  
  86.            To view a particular character in a font file, press "E" or "e"
  87.       (for ENTER Character) and at the lower left corner of the screen the
  88.       program will prompt you to enter the character from the keyboard.  To
  89.       view characters not on the keyboard, press and hold down the ALT key
  90.       while entering the character's ASCII number from the NUMERIC KEYPAD,
  91.       then release the ALT key.  The screen will display the appropriate
  92.       character.  Following the display of the character, FONTVIEW will
  93.       resume its display sequence order beginning with the character with
  94.       the next higher ASCII number.  If you change your mind after pressing
  95.       "E", merely hit RETURN without entering a number and FONTVIEW will
  96.       resume its display sequence from where it left off.  If you enter a
  97.       character or ASCII number of a character which is not in the font
  98.       file, FONTVIEW will beep, display "NOT THERE.  TRY AGAIN" for two
  99.       seconds then prompt you to "Enter Character" again, all in the lower
  100.       left hand corner of the screen.
  101.  
  102.            To exit FONTVIEW, hit the Escape key and you will exit after the
  103.       next character has been displayed.  Upon exiting, FONTVIEW will
  104.       display the LaserJet escape code sequence to use to call the font into
  105.       use after it has been downloaded.
  106.  
  107.            To check that FONTVIEW is compatible with your hardware, I
  108.       suggest you first try FONTVIEW on a file which is known to be
  109.       specified correctly.  The file DEMO.SF2 (included in this archive) is
  110.       a twelve character (6 portrait, 6 landscape) font file which will
  111.       establish that your hardware is suitable.  Type FONTVIEW DEMO.SF2 to
  112.       display the 6 characters ("A", "B", "W", "p", "x" and "y"), first in
  113.       landscape, then in portrait orientation.  DEMO.SF2 is not a valid
  114.       LaserJet font file since it contains a mixture of portrait and
  115.       landscape characters.  The landscape characters are stored in the file
  116.       as ASCII characters 1-6 and so appear first in the display sequence. 
  117.  
  118.  
  119.                            THE FONTVIEW DISPLAY SCREEN
  120.  
  121.            The display window is divided into two elements: a text portion
  122.  
  123.  
  124.  
  125.       along the left side, and a graphics window occupying the rest of the
  126.       screen.
  127.  
  128.  
  129.                                THE GRAPHICS WINDOW
  130.  
  131.            Inside the graphics window you'll see a magenta rectangle within
  132.       which the magnified character is displayed.  This rectangle, or cell,
  133.       displays the boundaries within which all characters in the font
  134.       normally fit.  Also shown within this font cell are two horizontal
  135.       lines.  The lower, solid line is the baseline which is the bottom row
  136.       of dots for most characters.  For example, the bottom of the "A", "B",
  137.       and "x" of DEMO.SF2 coincide with the baseline.  Descenders fall below
  138.       this baseline.  In many fonts (particularly the larger fonts) the
  139.       bottom of the "C", "G", "O" and others extend up to a few dots below
  140.       the baseline to improve their attractiveness.  The second, dotted line
  141.       shown in the cell is the "x-height" line.  The top of the lower case
  142.       "x" should coincide with the x-height line while the bottom of the
  143.       letter coincides with the baseline.  The x-height is generally the top
  144.       of lower-case characters except for those with ascenders ("b", "d",
  145.       etc.), however, again in many typefaces the top of the "c" and "o" and
  146.       the top of the loops in "b", "d", "p" and others often extend 1-3 dots
  147.       above the x-height line to improve their appearance.
  148.  
  149.            Finally, and most important, the magnified character is dis-
  150.       played.  Characters are placed within the character cell using the
  151.       "left offset" value stored in the character header unless the left
  152.       offset value is 0 or negative.
  153.  
  154.  
  155.                                  THE TEXT WINDOW
  156.  
  157.            The left, text portion of the screen presents data found in the
  158.       font and character headers.  HP-specification laserjet soft fonts are
  159.       comprised of three types of data:  first is the FONT header, which
  160.       contains information for the font as a whole; second are CHARACTER
  161.       headers (one for each character) which contain width, height, and
  162.       spacing information for each character; and finally, the bit image
  163.       data for the character.
  164.  
  165.                                     FONT DATA
  166.  
  167.            The top portion of the text portion of the screen displays a
  168.       portion of the font header information.  This information is displayed
  169.       once for each font, and thus will not change as you view each
  170.       character.
  171.  
  172.            The first line shows the DOS filename of the font which you
  173.       entered on the command line.
  174.  
  175.            The second line shows the name of the font if it is included in
  176.       the header.  Often, particularly with shareware fonts, this
  177.       information is not included so nothing will appear after "NAME:" on
  178.       this line.
  179.  
  180.            The third line shows the typeface (Times Roman, Helvetica,
  181.       Optima, Garamond, etc.).  This information is decoded from the font
  182.  
  183.  
  184.  
  185.       header.  HP has assigned codes for over 20 typefaces, which I have
  186.       incorporated into FONTVIEW.  Nonetheless, many soft fonts put a code
  187.       value in the header which FONTVIEW does not recognize. in this case,
  188.       "UNKNOWN" will appear on this line.
  189.  
  190.            The fourth line Shows the orientation of the font, either
  191.       "Portrait" or "Landscape". 
  192.  
  193.            The fifth line shows the spacing of the font and should be either
  194.       "Fixed", or "Proportional".
  195.  
  196.            The sixth line shows the symbol set of the font, which identifies
  197.       which character set the font is using (USASCII, PC-8, HP Roman
  198.       Extensions, etc.).  Again, HP has assigned codes for over 30 such
  199.       sets, which are included in FONTVIEW, but if the font maker uses a
  200.       code which is not recognized, the word "UNKNOWN" will appear on this
  201.       line.
  202.  
  203.            The seventh line, "Points", shows the height of the font, in HP
  204.       points.  HP fonts are defined based on 72 points per inch, as opposed
  205.       to the standard printer's point which is 1/12 of a Pica or 72.27 per
  206.       inch.  The body size of a font, in points, is the vertical distance
  207.       measured from the bottom of a descender, such as the stem of a "p" to
  208.       the top of an ascender, such as the stem of a "b".  To convert points
  209.       to 300 dots/inch dots, multiply by 4.167.
  210.  
  211.            The eighth line, "Default Pitch" shows the horizontal spacing of
  212.       characters in a font in characters per inch.  A 12 pitch font prints
  213.       12 characters per inch.  Actually the default pitch figure defines
  214.       character spacing only for fixed spaced fonts.  For proportionally
  215.       spaced fonts the figure displayed is the reciprocal of the width of
  216.       space character.  For example a default pitch of 27.27, as in the
  217.       DEMO.SF2 file, means that 27.27 spaces will fit in one horizontal
  218.       inch.  The width of the individual characters of a proportional font
  219.       is shown on the lower part of the screen under CHARACTER DATA.
  220.  
  221.            The ninth and tenth lines show the dimensions of the font's cell,
  222.       in HP dots.  Since HP uses 300 dots per inch in their font specifica-
  223.       tions, dividing the displayed cell dimensions by 300 will provide you
  224.       the physical dimensions of the cell.  For example, if the cell width
  225.       is 41 dots, it is 41/300 = 0.137 inches wide.  These dimensions are
  226.       used to draw the cell on the graphics portion of the screen.  
  227.            The eleventh line, "BaseLine dst" shows the distance from the top
  228.       of the cell to the baseline, in dots.  This value is used to position
  229.       the baseline in the FONTVIEW graphics window.
  230.  
  231.            The twelfth line, "x" height displays the distance, in dots, from
  232.       the baseline to the x-height line, as described earlier.  Many
  233.       shareware fonts leave this field blank; and, if this has been done, no
  234.       x-height line will appear in the FONTVIEW graphics window.
  235.  
  236.            The final, thirteenth line of the font data area shows the dot
  237.       magnification used by FONTVIEW to display the font characters.  As
  238.       discussed earlier, an X-magnification of 9 means that 9 dots are
  239.       displayed horizontally, for each single horizontal dot printed by
  240.       your laserjet printer.  The true physical magnification, naturally
  241.       depends on the size of your screen.  For my NEC Multisynch monitor,
  242.  
  243.  
  244.  
  245.       with a horizontal image of about 10 inches and vertical image of
  246.       about 8 inches, the overall image magnification is about 4.7 times
  247.       the X-magnification shown.  Thus, for a horizontal dot magnification
  248.       of 9, the actual physical magnification is 4.7 * 9 or about 42:1. 
  249.       Similarly, the vertical magnification is about 6.9 times the displayed
  250.       amount, or 41:1 for a Y-magnification of 6.  If the ratio of X-
  251.       magnification to Y-magnification is maintained at 3:2, the screen
  252.       image aspect ratio (vertical to horizontal proportions) matches the
  253.       printer aspect ratio within about 3%.  FONTVIEW automatically
  254.       maintains this 3:2 ratio unless the font is so large (more than 30
  255.       points) that the image cannot fit on the screen.  If this occurs, the
  256.       program will shift to a one dot:one dot magnification which will allow
  257.       fonts of over 60 points to be displayed, although fonts will appear
  258.       tall and skinny on the screen due to the distortion in aspect ratio. 
  259.       Also, at 1:1 magnification, all characters are displayed as solids
  260.       since each "display dot" cannot be further reduced in size to produce
  261.       the grid-like dot display appearance.
  262.  
  263.  
  264.                                  CHARACTER DATA
  265.  
  266.            Below the font data area of the text window is the Character
  267.       data.  This data changes for each character displayed and is updated
  268.       immediately before each character is displayed in the graphics window.
  269.  
  270.            The first line shows the ASCII number of the character.  To the
  271.       right of this, in parenthesis, is the EGA text-mode representation of
  272.       the character.  Above ASCII 126 this may not match the actual
  273.       character shown in the graphics area, because EGA text mode displays
  274.       the equivalent of HP's PC-8 symbol set.  If your font contains one of
  275.       the more than 30 other symbol sets, the characters will not be the
  276.       same, particularly above ASCII 127.  Nonetheless, the more commonly-
  277.       used characters below ASCII 128 should match.  If your font contains
  278.       characters below ASCII 32, the EGA text mode character may not be
  279.       shown in parenthesis since many of these characters are control
  280.       characters which would scroll or otherwise distort the screen if
  281.       displayed.
  282.  
  283.            The second and third lines show the dot width and height of the
  284.       character.  The HP LaserJet II technical reference manual indicates
  285.       that a character height or width larger than the corresponding
  286.       dimension of the cell specified in the font descriptor will invalidate
  287.       the character download, although my experience suggests the rule is
  288.       somewhat more complex than it appears:  for fixed pitch fonts, if the
  289.       left offset (see below) plus the character width does not exceed the
  290.       cell width, the character is OK; for proportional fonts, if the "delta
  291.       X" (discussed below) does not exceed the cell width, it's OK.  It is
  292.       possible, therefore, for a valid LaserJet character to extend beyond
  293.       the right boundary of the graphics cell, although in practice this is
  294.       rare.  FONTVIEW will beep when it reads a character whose height or
  295.       width violates the LaserJet cell rules, but will attempt to display
  296.       the character.  If FONTVIEW terminates abruptly, immediately following
  297.       a beep, it is likely that the character was larger than the cell and
  298.       would not fit on the screen at the dot magnification being used.
  299.  
  300.            The fourth line displays the left offset, in dots.  This is the
  301.       number of dots that the LaserJet printer moves to the right before
  302.  
  303.  
  304.  
  305.       printing the character displayed on the screen, and thus is how
  306.       character spacing is performed in the printer.  Note that this value
  307.       is negative for characters which are moved to the left before
  308.       printing.  FONTVIEW uses the left offset value to position characters
  309.       within the graphics screen cell, except that negative values are
  310.       ignored for display purposes. 
  311.  
  312.            The fifth line shows the top offset, in dots.  This is the number
  313.       of dots above the baseline at which the top of a character begins. 
  314.       For example the portrait-orientation "A" in DEMO.SF2 has a character
  315.       height of 29 dots and a top offset of 28 dots.  This means that the
  316.       top of the character begins 28 dots above the baseline.  Since the
  317.       character is 29 dots high, this results in the bottom of the character
  318.       coinciding with the baseline.
  319.  
  320.            The sixth and last line shows the Delta X value in dots.  This
  321.       is the number of dots the printer moves from where it left off at the
  322.       end of the previous character to where it moves after printing the
  323.       character being displayed.  This Delta X defines the width of a
  324.       character on the printer; this is the value which many word
  325.       processors include in Width Tables so that they can properly space
  326.       text which will use a downloaded font.
  327.  
  328.  
  329.                                  TROUBLESHOOTING
  330.  
  331.            If FONTVIEW abruptly terminates before displaying any characters,
  332.       it may be that extraneous bytes are contained in the file.  Run
  333.       FNTCLEAN to clean up the file and then run FONTVIEW on the new file
  334.       created.
  335.  
  336.            If FONTVIEW terminates before displaying any characters, and you
  337.       are attempting to view a file already processed by FNTCLEAN, recheck
  338.       the path and filename you typed in on the command line.  Particularly
  339.       check that the path exists since I have bombed FONTVIEW many times by
  340.       mistyping the path name.
  341.  
  342.            If FONTVIEW terminates in the middle of a file, it may be that
  343.       the manual magnification is set too high, or because some character
  344.       dot data overflows the "cell" boundary defined in the font header and
  345.       cannot fit on the screen.  Try running FONTVIEW at reduced
  346.       magnification.  For example, if the original magnification was 9 by 6
  347.       (x-mag, y-mag), try using /M6,4 on the command line.  This is the next
  348.       lower magnification which preserves the 3:2 x- to y- magnification
  349.       ratio which results in correct vertical and horizontal proportions on
  350.       the screen.
  351.  
  352.  
  353.                                   REGISTRATION
  354.  
  355.            You will soon notice that many shareware and even commercial
  356.       fonts don't sit on the baseline.  For some unknown reason, many fonts
  357.       sit one dot above the baseline, although I've never observed this in a
  358.       HP-designed font. This offset does not impair the font's performance
  359.       in your Laserjet printer since if all characters are situated one dot
  360.       (1/300 inch) too high, it is not noticeable, however it is annoying
  361.       when you view the font using FONTVIEW.  Also, if the character sits
  362.  
  363.  
  364.  
  365.       one dot too high, it is likely the x-height line will appear one dot
  366.       too high as well.  Furthermore, many font makers do not bother to set
  367.       the x-height since it does not affect the font's performance in a
  368.       printer.  Again, though, it is annoying since the x-height line is
  369.       helpful when viewing any lower-case letter in FONTVIEW.  Finally,
  370.       sometimes a font will contain characters which violate the LaserJet
  371.       cell boundary rules or contain dots so far outside the cell that
  372.       FONTVIEW bombs.
  373.  
  374.            If you register FONTVIEW and FNTCLEAN, you will receive the
  375.       latest versions of the two programs on a diskette, PLUS, you will
  376.       receive a copy of the programs FONTFIX and LJROTATE.
  377.  
  378.            FONTFIX, which works on portrait soft fonts, is a very hard-
  379.       working program.  It has all of the features of FNTCLEAN, plus: 
  380.        
  381.            1.   Displays the hexadecimal values and interpretation of all 64
  382.                 bytes of the LaserJet II font header. 
  383.        
  384.            2.   Displays the HP LaserJet escape sequence which completely
  385.                 identifies the font and can be used by your word processor
  386.                 or spreadsheet to designate the font for use, once it has
  387.                 been downloaded. 
  388.        
  389.            3.   Sorts its output file by ascending ASCII numbers.  Amazing-
  390.                 ly, I have viewed many font files which do not have their
  391.                 character data sorted in ASCII order.
  392.        
  393.            4.   Has a Command line option to move the Baseline for all
  394.                 characters Up or Down by a user-selected number of dots. 
  395.        
  396.            5.   Has a Command line option to set the font's "x-height"
  397.                 either manually (in dots), or have the program set the font
  398.                 x-height using data from the lower-case "x" character (ASCII
  399.                 120) if it is included in the font file. 
  400.        
  401.            6.   Goes through each character in a font on a bit (pixel)
  402.                 level, along the top, bottom, left and right edges,
  403.                 eliminating superfluous rows of dots which are all "off";
  404.                 then adjusts left offsets, top offsets, character widths and
  405.                 heights appropriately, and reconstitutes the character.  It
  406.                 then returns to the FONT header, and sets the cell width,
  407.                 cell height, and baseline distance such that these values
  408.                 are correct.  This results in a font which uses the minimum
  409.                 number of bytes to fully describe each character, thus
  410.                 minimizing download time, LaserJet memory requirements, and
  411.                 disk storage requirements.  Several shareware fonts do not
  412.                 make effective use of top offsets or left offsets.  If you
  413.                 display a font which uses the same height and width for each
  414.                 character, it is likely that the size of the file can be
  415.                 reduced.  For example, the shareware font LARGEHLW.SFP was
  416.                 34,773 bytes long originally, but only 16,992 bytes long
  417.                 after processing by FONTFIX.  Naturally, the modified font
  418.                 performed identically on my LaserJet printer.
  419.  
  420.  
  421.            LJROTATE creates a LANDSCAPE font from your PORTRAIT font input
  422.  
  423.  
  424.  
  425.       or a PORTRAIT font from your LANDSCAPE font.  It processes characters
  426.       in a manner similar to FONTFIX to set correct cell dimensions, sort
  427.       output characters into ascending ASCII order, and minimize the number
  428.       of bytes to define each character, then rotates the character.  Since
  429.       many fonts are available in only one orientation (portrait or
  430.       landscape), LJROTATE can be very useful.  I now don't bother to
  431.       download both orientations of the same font.  Instead, I download the
  432.       portrait font, set the baseline and x-height with FONTFIX, and then
  433.       run LJROTATE to create a landscape font with the correct baseline
  434.       distance and x-height.
  435.  
  436.  
  437.  
  438.            You may register both FONTVIEW and FNTCLEAN, and receive FONTFIX
  439.       and LJROTATE by forwarding $17.00 (California residents add $1.11
  440.       sales tax) to:
  441.        
  442.        
  443.                           S.H. Moody & Associates, Inc.
  444.                                1810 Fair Oaks Ave.
  445.                             South Pasadena, CA 91030
  446.  
  447.  
  448.            Please note that you are registering for FONTVIEW so I can
  449.       distinguish your order from orders for other products.
  450.