FONTEDIT, (C) by Alexander Walter page 1 FONTEDIT version 1.2 Copyright 1990 Alexander Walter FONTEDIT, (C) by Alexander Walter page 2 TABLE OF CONTENTS 1. Acknowledgments......................................................3 2. Miscellany...........................................................3 3. Requirements and Limitations.........................................3 4. Introduction and Features............................................3 5. Guide to Operation...................................................4 5.1. Basic Screen Layout.............................................5 5.2. Main Menu.......................................................6 5.2.1. Pixel Edit.................................................6 5.2.1.1. Invert.....................................................7 5.2.1.2. Area Operators.............................................7 5.2.1.2.1. Polygon Fill & Clear.....................................8 5.2.1.2.1.1. Bezier Curve..........................................9 5.2.1.2.2. Rectangle Fill & Clear..................................10 5.2.1.2.3. Ellipse & Wedge Fill / Clear............................11 5.2.1.2.4. Parallelogram Fill & Clear..............................12 5.2.1.2.5. Pixel Edit..............................................12 5.2.1.3. Clear Character...........................................13 5.2.1.4. Row/Col Ins/Del...........................................13 5.2.1.5. Upside-Down...............................................14 5.2.1.6. Adjust Kerning............................................14 5.2.1.7. Quit & Save...............................................14 5.2.1.8. Toggle Pixel..............................................14 5.2.1.9. Quit, no Save.............................................14 5.2.2. Zoom / Unzoom.............................................14 5.2.3. Font Operators............................................15 5.2.3.1. New Cell Width............................................15 5.2.3.2. New Cell Height...........................................16 5.2.3.3. Create New Font...........................................16 5.2.3.4. Make Landscape / Make Portrait............................16 5.2.3.5. Make Fixed Width / Make Propor............................16 5.2.3.6. New Pitch (HMI)...........................................16 5.2.3.7. New VMI...................................................17 5.2.3.8. New Point Size............................................17 5.2.3.9. Move Baseline.............................................17 5.2.3.10. Main Menu.................................................17 5.2.4. Replicate.................................................17 5.2.5. New Font..................................................18 5.2.6. Create New Char...........................................18 5.2.7. Delete Character..........................................18 5.2.8. Printer Support...........................................19 5.2.8.1. Download Font.............................................19 5.2.8.2. Print File................................................19 5.2.8.3. Echo Text.................................................19 5.2.8.4. Page Eject................................................19 5.2.8.5. Use LPT2..................................................19 5.2.8.6. Built-in Fonts............................................20 5.2.9. Import TIFF...............................................20 5.2.10. Resize Character..........................................21 5.2.11. Quit......................................................21 5.3. Notes..........................................................21 6. Sample Session......................................................22 FONTEDIT, (C) by Alexander Walter page 3 1. Acknowledgments FONTEDIT is copyright 1990 by Alexander Walter. All rights reserved. The purchaser is granted the right to make one copy for backup or archival purposes. The run-time file BRUN45.EXE is copyright by Microsoft and is distributed with this package in accordance with the QuickBasic 4.5 licensing agreement. Thanks to Charles Nicol II and Jay Latham for beta-testing and many helpful user-interface suggestions. 2. Miscellany FONTEDIT is available as author-supported software at the low price of $69. Please send check or money order to: Alexander Walter 182 ILER Dr. Middletown, NJ. 07748 phone support is available at (201) 389-6755 or (201) 671-5080 (note: after January 6, 1991, use area code 908 instead of 201). If you encounter any problems or bugs with FONTEDIT, please report them to the author along with a description of the steps that led up to it. If you have any suggestions for new features, pass them along. 3. Requirements and Limitations FONTEDIT requires a graphics display, CGA or higher. A Hercules graphics display can be used provided you use a CGA emulator on it. Several such emulators are available through shareware or the public domain. FONTEDIT requires approximately 220K of available RAM, i.e., memory not used by DOS or TSRs. FONTEDIT can be run from one floppy disk drive; however, since HP font files can be large, hard disk usage is recommended. The font file being edited with FONTEDIT must be of the HP LaserJet format. This includes Series II and above. Postscript font files are not supported. You cannot change the built-in Courier and TTY fonts of the laser printer. Purchasers of version 1.2x will be entitled to a free upgrade to the next version of FONTEDIT. 4. Introduction and Features FONTEDIT is a tool to view and edit laser printer soft font files for the Hewlett-Packard laser printer. Such a tool can be used to touch-up existing FONTEDIT, (C) by Alexander Walter page 4 characters in a file, define special characters in a font file, or create an entirely new fontface. For example, using FONTEDIT you could add Greek characters to a font file you already have; you could define special characters such as the Gantt chart symbols used by Timeline and other project management software; or you could produce a stylized version of your company's name or logo. FONTEDIT is distinguished in its price category by the features offered: - Can view and edit both portrait and landscape fonts, and convert one to the other. - Handles both fixed-width and proportional fonts, and can convert one to the other. - Automatically detects a mouse if present and uses it. - Requires only CGA graphics. Will detect and use EGA or VGA if available. - Maximum point size depends on display mode. Maximum 110 point (VGA); 80 point (EGA); or 44 point (CGA). - Allows both pixel-level editing of individual characters and fill & clear area operations (rectangle, parallelogram, circle, ellipse, wedge, arbitrary polygon, Bezier curves). - Can change font parameters (maximum height & width, baseline) - Can resize the font up or down to any arbitrary point size, up to the maximum allowable for the display adaptor, and smooths characters while doing so. - Can resize individual characters while smoothing and maintaining their original shape. - Can insert or delete rows and columns of individual characters. - Can import TIFF bilevel graphics as characters. - Can turn characters upside-down, and reverse video. - Can change intercharacter spacing (kerning) of proportional fonts - Can delete characters from a font. - Can define new characters to add to a font. - Zoom mode available for close-ups. - Includes printer support within the FONTEDIT environment to see the effect of editing changes. - Handles font files which consist of several fonts grouped together. - Menu-driven user interface, available at all times. - Built-in DOS access. 5. Guide to Operation To begin FONTEDIT, simply type FONTEDIT as the DOS prompt. You may follow it with the name of the font file to edit. If you don't, FONTEDIT will ask you to supply a font filename. FONTEDIT requires only a CGA adaptor, but will automatically detect and use the higher resolution of a VGA or EGA adaptor if available. This can be overridden by including a switch either on the command line or when specifying the font filename to edit. For instance, if an EGA monitor is being used but you want to take advantage of the faster graphics and lower memory requirements of CGA mode, you can force CGA mode when beginning FONTEDIT by typing: FONTEDIT filename /cga FONTEDIT, (C) by Alexander Walter page 5 To force EGA mode while using a VGA adaptor, use "/ega". While you are prompted for a filename, FONTEDIT displays a message whether a mouse driver is installed or not. If you have a mouse but have forgotten to install the driver, you can exit FONTEDIT at this point by pressing CTRL-C. Either on the command line or when FONTEDIT asks for a filename, you may supply a filename containing wildcards and, optionally, a drive designator. FONTEDIT responds with a list of matching filenames from which you can point and shoot with a mouse. If a mouse is not installed, you can choose a filename by moving the reverse-video highlight with the arrow keys and pressing Enter. If a drive designator is not specified, the default drive is used. If you make a mistake in the wildcards, you can press Space Bar and reenter the wildcards or a filename. When a font file has been chosen, FONTEDIT will create a backup copy of the font file, giving it the extension ".BAK". After loading the font file, if it contains multiple font definitions you will be asked which font you want to view and edit; after you answer you will see the main menu (described below). If the font file contains only one font definition, you will immediately be at the main menu. If ASCII 65 (capital "A") is defined for the font file you are editing, it will be displayed. At any time after this point, you may temporarily escape to DOS by pressing ALT-D. Upon completion of editing, saving of your work, and exiting FONTEDIT, you can download to your printer the newly edited font file. Normally, this is done by using either the DOS command: copy /b fontfile prn or by using whatever font downloading utilities you usually use. Optionally, while editing your font file you can download it to the laser printer from within FONTEDIT, and print either a text file from disk or echo keyboard input to the printer using the font. This is described further later. 5.1. Basic Screen Layout The basic screen layout is a status line at the top; on the top right are the menu choices available via the Function Keys, RETURN, or ESC; on the middle right is information about the font being edited; and on the bottom right is information about the displayed character. The rest of the screen is used to display a magnified version of the characters. At times the bottom line is used for messages. The displayed character and the border around it is referred here as the character box. The character box is surrounded by a larger box which is referred here as the cell box. The cell box denotes the largest character size which any character in this font can be. The information area on the right of the screen shows the size of the cell box and character box. The size of the cell box can be changed under the Font Operators menu. If zoom mode is active (described in a subsequent section), the cell box is suppressed and the character box is displayed so that it takes up as much of FONTEDIT, (C) by Alexander Walter page 6 the screen as possible. For portrait fonts, the baseline is shown on screen. The baseline is the level of the bottom of characters without descenders, such as "x", "c", or "r". Characters such as "p", "q", and "y" normally have descenders which extend below the baseline. The magnification factor is automatically chosen at start-up to provide a size which fills up the screen as much as possible while maintaining a "pleasing" ratio of width to height. The character box is displayed with grid lines superimposed as an editing guide for the user. If the magnification is such that the character box would become congested while the grid lines are displayed, the grid lines are suppressed. 5.2. Main Menu The status message at the top of the screen says "Press a character to display it." The main menu contains the following choices: F2 = Pixel Edit F3 = Zoom (note: if already in Zoom mode, this will say "Unzoom") F4 = Font Operators F5 = Replicate F6 = New Font (note: you see this choice only if the font file defines more than one font) F7 = Create New Char. F8 = Delete Character F9 = Printer Commands F10= Import TIFF RET= Resize Character ESC= Quit At this point you can either begin to operate on the character displayed, or press a letter or number key to display that character. If the ASCII value corresponding to the key you pressed is not defined in the font, there will be no response. To display any ASCII characters defined in your font file, including those such as ASCII 127 which don't have an associated key on the keyboard, you can also press and hold the ALT key, type the 3-digit ASCII value on the numeric keypad, then release the ALT key. Again, if that ASCII value is not defined in the font, there will be no response. 5.2.1. Pixel Edit Edit is a choice from the main menu, and operates on the character displayed. Upon entering the edit mode, the status message at the top of the screen says either: "Pixel Editing. Left Button: Set Pixel Right Button: Clear Pixel" if a mouse is installed, or: "Pixel Editing. Use arrow keys to move crosshairs"; FONTEDIT, (C) by Alexander Walter page 7 if no mouse is installed. The following menu choices are displayed: F2 = Invert F3 = Area Operators F4 = Clear Character F5 = Row/Col Ins/Del F6 = Upside-Down F7 = Adjust Kerning (note: you will see this menu choice only if the font being edited is proportional) F10= Quit & Save RET= Toggle pixel (note: you will see this menu choice only if no mouse is installed) ESC= Quit, no save At this point, the mouse arrow cursor will be visible if a mouse is installed. If no mouse is installed, you will see a crosshair which you can move one pixel at a time with the arrow keys. The crosshairs can be moved in larger increments by using the PgUp, PgDn, Tab, and Shift-Tab keys. You can begin editing individual pixels by either moving the mouse arrow and clicking, or by moving the crosshair and pressing RETURN to toggle the pixel underneath on or off. If zoom mode is not in effect, the character box can be moved around within the cell box by pressing CTRL-UP, CTRL-DOWN, CTRL-LEFT, or CTRL-RIGHT. If your keyboard has two sets of arrow keys, the arrow keys on the numeric keypad must be used. As you move the character, the left offset and top offset are updated in the character information display. 5.2.1.1. Invert Invert is a function chosen from the Pixel Edit menu. It will change all "on" pixels to "off" pixels, and vice versa. It operates on the character presently displayed, including any editing changes already made up to that point. 5.2.1.2. Area Operators Area Operators is a choice from the Pixel Edit menu. It allows you to fill (turn "on") or clear (turn "off") a large group of pixels at once. Several types of shapes are available. Upon entering the edit mode, the status message at the top of the screen says: "Area fill & Clear. Choose a shape with F keys." The following menu choices are displayed: F3 = Polygon F4 = Rectangle F5 = Ellipse & Wedge F6 = Parallelogram ESC= Pixel Edit At this point you can either choose one of the shapes shown, or escape back FONTEDIT, (C) by Alexander Walter page 8 to pixel editing. Any area operations you have completed but now wish to undo must be undone by escaping to Pixel Editing, and then escaping from Pixel Editing back to the Main Menu. Caution - this will also undo any other unrelated editing changes for that character. All area operations act on a character using the aspect ratios presently in use. For instance, if you choose a circular fill area operation (a special case of the ellipse fill), but the character is displayed such that it is wide and flat, the filled area will appear circular on screen. However, once is is printed, the filled area would appear more like a tall, upright ellipse rather than a circle. The default aspect ratio has been chosen to eliminate this potential problem. 5.2.1.2.1. Polygon Fill & Clear Polygon fill and clear allows filling and clearing of areas of arbitrary, closed shape. The shape should be a polygon that does not loop onto itself such as a figure eight. For such a polygon, only one of the interior loops would be filled or cleared. Upon entering Polygon Fill & Clear, the status message at the top of the screen says either: "Polygon fill. Left Button: Mark vertex Right Button: Close polygon" if a mouse is installed, or simply: "Polygon fill." if no mouse is installed. The menu keys display the choices: With Mouse: Without Mouse: F10= Close Polygon RET= Mark vertex ESC= Cancel Polygon ESC= Cancel To begin marking the polygon to fill or clear, go to a vertex of it and either press the left mouse button (if using a mouse), or press RETURN (if not using a mouse). The first vertex will blink as a marker to you. Then go to each succeeding vertex in order and either press the left mouse button or press RETURN. As you mark each vertex, a partially drawn polygon will be superimposed on the character displayed. At any time you can abort the polygon fill & clear operation by pressing ESC. After the first vertex is marked, the menu choice "F2 = Bezier Curve" will appear. This choice allows a Bezier curve segment to be defined. This choice is described more fully below. After you have marked each vertex, it is not necessary to go back to the first vertex; simply press the right mouse button (if using a mouse), or press F10 (if not using a mouse). The polygon will automatically be completed between the last vertex marked and the first vertex. FONTEDIT, (C) by Alexander Walter page 9 At this point, the character is temporarily suppressed, leaving displayed the outline of the character box and the polygon just marked. You now have the option of: ---------- ----------- Filling, or \ / polygon interior Clearing, or |--- either the --- or XOR'ing / \ polygon exterior ---------- ----------- If a mouse is installed, the status line will read: "Left Button: Fill Right Button: Clear Both: XOR" The menu choices will show: With Mouse: Without Mouse: F3 = Fill F4 = Clear F5 = XOR ESC= Cancel ESC= Cancel Move the mouse or crosshairs to either the interior or exterior of the polygon, and either click the mouse or press the function keys F3, F4, or F5. After a few seconds, the character will be redrawn with the affected pixels either filled, cleared, or exclusive-ORed (XOR'ed). You will be returned back to the Area Operations menu. 5.2.1.2.1.1. Bezier Curve This choice is enabled during Polygon Area Operations after the first point of a polygon has been chosen. Upon choosing the Bezier Curve option, you will be given the choices: F2 = Set Endpoint F3 = Set C1 F4 = Set C2 F10= Curve OK ESC= Abort A Bezier curve is defined by four points: the start, the end, and two control points (C1 & C2). When the Bezier Curve option is chosen, the most recently defined polygon vertex is taken as the starting point. The other three points are chosen using the F2, F3, and F4 keys. As each point is chosen, the menu will change to read "Modify ...". For instance, after the endpoint is chosen, the menu will show "F2 = Modify Endpoint". Once the three points are chosen, a Bezier curve will be drawn. The location of any of the three points can then be modified. While a point is being modified, the Bezier curve will "rubber-band" to show the effect of moving that point. The old location of the point will blink as a reminder of its location. Once the three points have been satisfactorily set, press F10 to accept the FONTEDIT, (C) by Alexander Walter page 10 Bezier curve. Polygon definition will continue from the ending of the Bezier curve. 5.2.1.2.2. Rectangle Fill & Clear Rectangle fill & clear allows filling of rectangular (including square) regions, and operates in a similar manner as polygon fill & clear, except that only the two diagonally opposite corners of the rectangle need to be marked. They can be either upper left - lower right, or lower left - upper right. Upon entering Rectangle Fill & Clear, the status message at the top of the screen says either: "Rectangle fill. Left Button: 1st corner Right Button: Opposite Corner" if a mouse is installed, or simply: "Rectangle fill." if no mouse is installed. The menu keys display the choices: With Mouse: Without Mouse: RET= Mark Corner ESC= Cancel Rectangle ESC= Cancel Rectangle To begin marking the rectangle to fill or clear, go to a corner of it and either press the left mouse button (if using a mouse), or press RETURN (if not using a mouse). The first corner will blink as a marker to you. Then go to the diagonally opposite corner and either press the right mouse button or press RETURN. At any time you can abort the rectangle fill & clear operation by pressing ESC. At this point, the character is temporarily suppressed, leaving displayed the outline of the character box and the rectangle just marked. You now have the option of: ---------- ----------- Filling, or \ / rectangle interior Clearing, or >--- either the --< or XOR'ing / \ rectangle exterior ---------- ----------- If a mouse is installed, the status line will read: "Left Button: Fill Right Button: Clear Both: XOR" The menu choices will show: With Mouse: Without Mouse: F3 = Fill F4 = Clear F5 = XOR FONTEDIT, (C) by Alexander Walter page 11 ESC= Cancel ESC= Cancel Move the mouse or crosshairs to either the interior or exterior of the rectangle, and either click the mouse or press the function keys F3, F4, or F5. After a few seconds, the character will be redrawn with the affected pixels either filled, cleared, or exclusive-ORed (XOR'ed). You will be returned back to the Area Operations menu. 5.2.1.2.3. Ellipse & Wedge Fill / Clear Ellipse fill & clear allows filling of elliptical (including circular) regions, and operates in a similar manner as rectangle fill & clear, except that only the center of the ellipse and a point on it need to be marked. Upon entering Ellipse Fill & Clear, the status message at the top of the screen says either: "Ellipse fill. Left Button: Center of ellipse" if a mouse is installed, or: "Ellipse fill. Go to center of Ellipse & mark it." if no mouse is installed. The menu keys display the choices: With Mouse: Without Mouse: F3 = Wider, Flatter F3 = Wider, Flatter F4 = Taller, Thinner F4 = Taller, Thinner F5 = Refresh Charac. F5 = Refresh Charac. F6 = Bigger Wedge F6 = Bigger Wedge F7 = Smaller Wedge F7 = Smaller Wedge F8 = Move Clockwise F8 = Move Clockwise F9 = Move Counterclk F9 = Move Counterclk F10= Ellipse OK RET= Mark Corner ESC= Cancel Ellipse ESC= Cancel Ellipse After you mark the center of the ellipse it will blink as a marker to you. The status line will change to read: "Ellipse fill. Right Button: Ellipse OK" if you are using a mouse, or: "Arrow keys: Define size F keys: Shape of Ellipse" if no mouse is installed. Move the mouse cursor or crosshairs to define the size of the ellipse; as you move, the ellipse is continually redrawn to show you where it will go. The default shape is circular, but you can change the shape by repeatedly pressing the F3 and/or F4 keys. The F6, F7, F8, and F9 keys allow you do define a wedge instead of a full ellipse. FONTEDIT, (C) by Alexander Walter page 12 At times, the redrawing process of ellipse may make it hard to make out the character underneath. If this becomes the case, press F5 to refresh the character display. When you have made the ellipse the right size and shape, press the right mouse button (if using a mouse), or the F10 key (if not using a mouse). At this point, the character is temporarily suppressed, leaving displayed the outline of the character box and the ellipse just marked. You now have the option of: ---------- ----------- Filling, or \ / ellipse interior Clearing, or |--- either the --- or XOR'ing / \ ellipse exterior ---------- ----------- If a mouse is installed, the status line will read: "Left Button: Fill Right Button: Clear Both: XOR" The menu choices will show: With Mouse: Without Mouse: F3 = Fill F4 = Clear F5 = XOR ESC= Cancel ESC= Cancel Move the mouse or crosshairs to either the interior or exterior of the ellipse, and either click the mouse or press the function keys F3, F4, or F5. After a few seconds, the character will be redrawn with the affected pixels either filled, cleared, or exclusive-ORed (XOR'ed). You will be returned back to the Area Operations menu. 5.2.1.2.4. Parallelogram Fill & Clear Parallelogram fill & clear allows the filling and clearing of parallelogram areas in a manner similar to rectangle fill & clear. Two adjacent corners of the parallelogram are first marked, as directed by the instructions on screen. After the second corner is marked, move the crosshairs or mouse cursor to the third corner. An outline of the parallelogram will be "rubber banded" on screen to show the size. Mark the 3rd corner as directed by the instructions on screen. Move the mouse or crosshairs to either the interior or exterior of the parallelogram, and either click the mouse or press the function keys F3, F4, or F5. After a few seconds, the character will be redrawn with the affected pixels either filled or cleared. You will be returned back to the Area Operations menu. 5.2.1.2.5. Pixel Edit This menu choice from the Area Operations menu allows you to return to pixel FONTEDIT, (C) by Alexander Walter page 13 editing. While in pixel editing you can, for instance, do detailed pixel by pixel touch-up work of the areas worked on by the area operators. 5.2.1.3. Clear Character This function is chosen from the Pixel Edit menu. It allows you to "clear" (turn off) all pixels within the presently displayed character box. 5.2.1.4. Row/Col Ins/Del Row/Col Ins/Del allows you to change the size of the character box by inserting or deleting rows and columns. Rows and columns are inserted or deleted under the current location of the mouse cursor or crosshairs. By moving the mouse or crosshairs you can insert or delete rows and columns anywhere in the character box. Row/Column insert/delete acts upon the image of the character as displayed. Since landscape fonts are displayed sideways, deleting a row on the screen corresponds to deleting a column in the printed version of the character. When inserting or deleting rows or columns, the upper left corner of the character box is anchored. The character box grows downward and/or to the right, and contracts upward and/or to the left. It will not grow beyond the limits of the cell box, and you cannot contract it to zero rows or columns. You can move the upper left corner of the character box by pressing CTRL-UP, CTRL-DOWN, CTRL-LEFT, or CTRL-RIGHT. If your keyboard has two sets of arrow keys, the arrow keys on the numeric keypad must be used to move the character box. When inserting rows or columns, the row or column under the mouse cursor or crosshairs will be replicated. Upon entering row/column insert/delete, the status message at the top of the screen says: "Insert & Delete Rows or Columns. Go to row or column and use F keys." The menu choices will show: F5 = Insert Row F6 = Delete Row F7 = Insert Column F8 = Delete Column F10= Size OK ESC= Abort Rows and columns are inserted and deleted as described above by pressing the F5, F6, F7, or F8 keys. When finished, press F10. If you decide not to accept the changes you made, press ESC. If you press ESC, the character will be restored to the size it had prior to beginning row/column insert/delete. Any editing changes made prior to beginning row/column insert/delete will also be restored. FONTEDIT, (C) by Alexander Walter page 14 5.2.1.5. Upside-Down This function is chosen from the Pixel Edit menu. It allows you to turn the character upside-down. 5.2.1.6. Adjust Kerning This function is chosen from the Pixel Edit menu. It allows you to adjust the character spacing for proportional fonts. This function will not be displayed or activated if the font is a fixed-width font, or if zoom mode is active. When activated, a blinking line indicates the start of the next character when the displayed character is printed. Use either the mouse (if installed) or the arrow keys to move the line. The arrow keys will change the kerning value in increments of 4. Since the units of kerning is in terms of a quarter-pixel, each press of an arrow key is equivalent to one pixel. Since the LaserJet Series II printer rounds the kerning value to the nearest whole pixel anyways, a finer resolution on the arrow keys would be ineffective. F10 or clicking the mouse accepts the new kerning value; ESC cancels the function. 5.2.1.7. Quit & Save This function saves your editing changes to this character, terminates Pixel Editing, and returns you to the main menu. 5.2.1.8. Toggle Pixel This function can be chosen only if using FONTEDIT without a mouse. It allows you to toggle the pixel underneath the crosshairs either on or off. 5.2.1.9. Quit, no Save This function terminates Pixel Editing and returns you to the main menu without saving any of your changes to the character displayed. 5.2.2. Zoom / Unzoom The zoom function enlarges the displayed character by suppressing the display of the cell box, and expanding the character box to as large a size as possible without regard to maintaining any particular ratio of width to height. While in zoom mode, the character box cannot be moved within the cell box, and kerning FONTEDIT, (C) by Alexander Walter page 15 cannot be adjusted. All other editing functions can be used in zoom mode. If already in zoom mode, the menu will instead say "Unzoom". Unzooming restores the display of the cell box and re-enables editing functions disabled during zoom mode. Direct control of the magnification values can be obtained by pressing Shift-F3 from the Main Menu. Magnification is used to change the size of the characters displayed on the screen. Normally, it will not be necessary to use this option, since FONTEDIT will automatically choose magnification factors which fill up the screen as much as possible while maintaining a "pleasing" ratio of width to height. The smaller the magnification factor, the smaller the character display will be, and vice versa. This feature could be used to approximate on screen how the printed character will look, although because of the screen's resolution it is not possible to duplicate the 300 dot per inch resolution of the printer. When Shift-F3 is used, FONTEDIT will display the present magnification factors and prompt you for new factors. The factors are displayed in the form X,Y. This means that every pixel in the character is composed of "X" rows and "Y" columns of pixels on the screen. Magnification factors of 1,1 are the smallest that can be displayed; the largest depends on the cell width and cell height of the font being displayed, and upon the display adaptor used. Magnification factors are inputted in the form X,Y including comma. If either X or Y is omitted, the present value of the missing X or Y is used. Pressing Return without supplying X or Y will keep the present values. 5.2.3. Font Operators This selection allows changing parameters of the entire font. Upon selection, the following menu choices will be available: F2 = New Cell Width F3 = New Cell Height F4 = Create New Font F5 = Make Landscape (note: if the font is already landscape, this will say "Make Portrait") F6 = Make Fixed Width (note: if font is already fixed width, this will say "Make Propor." F7 = New Pitch (HMI) F8 = New VMI F9 = New Point Size F10= Move Baseline RET= Move Underline ESC= Main Menu 5.2.3.1. New Cell Width This changes the cell width, which is the maximum width a character in the font can have. The allowable values for the new cell width are presented as a range; the lower bound is determined by the maximum character width and offset FONTEDIT, (C) by Alexander Walter page 16 for all of the defined ASCII values in the font. The maximum is a function of screen resolution. Note that if the new cell width is chosen very wide for a portrait font (>187 for CGA, >331 for EGA, >459 for VGA), you won't be able to convert the font to landscape using FONTEDIT. 5.2.3.2. New Cell Height This changes the cell height, which is the maximum height a character in the font can have. The allowable values for the new cell height are presented as a range; the lower bound is determined by the maximum character height and offset for all of the defined ASCII values in the font. The maximum is a function of screen resolution. Note that if the new cell height is chosen very tall for a landscape font (>187 for CGA, >331 for EGA, >459 for VGA), you won't be able to convert the font to portrait using FONTEDIT. 5.2.3.3. Create New Font This creates a new font from scratch. You will be led through a series of questions to establish the following font parameters: - Cell Width - Cell Height - Baseline - Orientation (portrait/landscape) - Spacing (fixed/proportional) - Default Horizontal Motion Index, HMI - Point Size - Underline Distance 5.2.3.4. Make Landscape / Make Portrait This option from the Main menu will convert the entire font to landscape (if presently portrait) or to portrait if presently landscape. The entire process can take several minutes. Once begun, this process cannot be halted. A status of the percentage completed is displayed at the top. 5.2.3.5. Make Fixed Width / Make Propor. This converts a font between fixed width and proportional. If it is being made proportional, the kerning for each character is automatically set to two pixels beyond the right of each character. 5.2.3.6. New Pitch (HMI) This changes the default HMI, which is the horizontal motion (pitch) the printer makes when it tries to print a character not defined in the font. For FONTEDIT, (C) by Alexander Walter page 17 instance, ASCII 32 (the space character) is usually not defined in a font. The pitch is defined in units of a quarter-pixel, 1200 per inch. 5.2.3.7. New VMI This changes the default VMI, which is the vertical motion the printer makes when it goes to a new line. The VMI is defined in units of a quarter-pixel, 1200 per inch. When converted to points (1/72nd of an inch), this is a common measure of the size of a font. Choosing this option will not automatically scale the existing characters in the font. That is done using the "New Point Size" option described below. 5.2.3.8. New Point Size New Point Size is a choice from the Main Menu. It allows you to change the point size of the entire font, either bigger or smaller. An attempt is made to smooth the characters and reduce the "jaggies" that would otherwise result. Each new character is displayed on the screen as it is processed. The larger the point size, the longer the process takes. Once begun, the process cannot be halted. However, when you are initially asked to supply a new point size, you can abort this function by pressing ESC or by inputting the present font size as displayed in the Font Information area at the middle right of the screen. 5.2.3.9. Move Baseline This option moves the baseline. The allowable values for the new baseline are presented as a range; the bounds are determined by a combination of character height, width, left offset, and top offset for all of the defined ASCII values in the font. If some characters in the font such as an underscore (ASCII 95) occupy the last row of the cell box, and other characters such as "|" occupy the top row of the character box, the baseline cannot be moved without first changing the offsets for those characters or resizing the cell box. 5.2.3.10. Main Menu This returns you to the Main Menu. 5.2.4. Replicate This function replicates the currently displayed character to another ASCII value. The new ASCII value must be one which is currently undefined. If necessary, first delete the ASCII character to be overwritten by using F8 from the Main Menu. FONTEDIT, (C) by Alexander Walter page 18 Upon choosing the Replicate function, you will be presented a list of unused ASCII characters. When you choose one, the ASCII character which was displayed prior to choosing Replicate will be copied to the new ASCII value, and you will be in Pixel Edit mode for the new character. 5.2.5. New Font New Font is a choice made from the Main Menu, and can be made only if the the font file being edited contains multiple font definitions. If it does and you select New Font, you will be presented a list of the available fonts along with their point size and orientation (portrait or landscape). Make your choice by number. You will be returned to the Main Menu, and if "A" is defined in the new font, it will be displayed. 5.2.6. Create New Char. Create New Character is a choice from the Main Menu. It allows you to define characters for ASCII values which previously had no symbol in the font. All members of the LaserJet family can print characters with ASCII values from 32 - 127, and 160 - 255 inclusive. Additionally, the LaserJet Series II and above can print characters with ASCII values from 1 - 6, 16 - 26, and 28 - 255 inclusive. In the interest of compatibility with the LaserJet Plus, FONTEDIT does not presently allow creation of characters with ASCII values outside the range of 32 - 127, and 160 - 255 inclusive. You can, however, still edit those characters if they are already defined in your font file. When you choose the Create New Character option, you will be presented a list of the available, unused ASCII values in the font. To pick, point and shoot with the mouse, or else if no mouse is installed, move the reverse-video highlight with the arrow keys and press ENTER. Press ESC at any time to abort back to the Main Menu. After you pick an ASCII value to define, FONTEDIT will create a blank character with a default size of half the cell box width and half the cell box height. You will then be put into Pixel Editing mode, where all the pixel editing tools, including resizing the character box and moving it around within the cell box, are available to you. When you are done, exit from Pixel Editing as usual, and you will be at the Main Menu. If at this point you change your mind about defining a new character, you can delete it using the Delete Character option described below. 5.2.7. Delete Character Delete Character is a choice from the Main Menu. It allows you to delete the definition of a character from the font after confirmation from the user. The definition of the character is removed from the font file, and the font file will become smaller. The deleted ASCII value becomes available to the Create New Character option. FONTEDIT, (C) by Alexander Walter page 19 5.2.8. Printer Support This selection allows you to print either text files or text echoed from the keyboard, using either the soft font being edited or one of the built-in fonts in the LaserJet. Upon choosing this option, the Status Line will read: "Download Font & Other Printer Functions" the menu choices will read: F2 = Download Font F3 = Print File F4 = Echo Text F5 = Page Eject F6 = Use LPT2 (note: if already using LPT2, this will read LPT1) F7 = Built-in Fonts ESC= Main Menu 5.2.8.1. Download Font This downloads the font to the printer and automatically selects it until further notice for subsequent text to be printed. Font ID 1 is automatically assigned. 5.2.8.2. Print File This prints a text file from disk using the latest font selected, either the downloaded font or a built-in font. Wildcards can be used when selecting the file. 5.2.8.3. Echo Text This will echo text from the keyboard to the printer using the latest font selected, either the downloaded font or a built-in font. Each line is sent to the printer only when RETURN is pressed. A page will not be ejected until F5 is pressed or until the page is full. 5.2.8.4. Page Eject This sends a form feed character (ASCII 12) to the printer. 5.2.8.5. Use LPT2 This will cause printer port LPT2 to be used instead of LPT1. If LPT2 is FONTEDIT, (C) by Alexander Walter page 20 already in use, pressing this key will select LPT1. 5.2.8.6. Built-in Fonts This choice will allow selecting one of the following fonts, the first 6 of which are internal to the LaserJet: - Portrait Courier - Bold Portrait Courier - Portrait TTY - Landscape Courier - Bold Landscape Courier - Landscape TTY - Previous soft font (only if one has already been downloaded) Note that switching between a landscape and a portrait font will cause the LaserJet to eject a page. 5.2.9. Import TIFF This selection allows TIFF graphics to be imported to unused ASCII values. If necessary, first delete the old character using the "Delete Char." option from the Main Menu. _ The TIFF image must be black and white color images aren't supported. The image can be uncompressed or packed (Huffman coded), but FAX compression isn't supported. The image must also be less than 638 pixels across. If the image is too tall to display using the present display mode (>187 for CGA, >331 for EGA, >459 for VGA), the bottom will be clipped off. If the image is larger than the cell box width or height, the image will be displayed on the screen, and a blinking box will appear. The blinking box represents the cell box size, and can be moved anywhere around the image using the mouse or arrow keys. Position the box over the portion of the image to import, then click the mouse or press F10. If the cell box is too small to cover the portion of the image you want to import, you can either abort and go to the Font Operators menu to change the Cell Width or Cell Height, or you can shrink the image using any paint software you have. If the image is smaller than the cell box, it will be imported immediately and centered in the cell box. After the image is imported, you are put into Pixel Edit mode. You can clean up the image, delete rows or columns, etc. You will not be allowed to abort from pixel editing without saving the character. If you truly want to discard the imported character, you can choose the "Delete Char." option from the Main Menu. FONTEDIT, (C) by Alexander Walter page 21 5.2.10. Resize Character This option allows an individual character to be stretched or compressed both horizontally and vertically independently. The resized character will be smoothed to eliminate "jaggies". When this option is chosen, the character box will blink. You can use the mouse or arrow keys to change the size of the character box, and it will "rubber-band" while you do so. The upper left corner remains fixed, and only the lower right corner moves. F5 can be used to refresh the display. When the size is OK, click the mouse or press F10 to accept the new size. The character will be scaled to the new size. After the character is resized, you may want to edit the character in order to adjust the left offset, top offset, and kerning (if the font is proportional). 5.2.11. Quit Quit is a choice from the main menu. It allows you to exit from FONTEDIT and will complete writing the changes you made to the font file. 5.3. Notes FONTEDIT uses the temporary files FE{TMP}.$$2, FE{TMP}.$$3, and FE{TMP}.$$4, which are erased upon completion. If these files already exist on your computer they will be overwritten. FONTEDIT, (C) by Alexander Walter page 22 6. Sample Session The best way to describe FONTEDIT is to walk through a sample session. The objective of this sample session will be to create a special symbol used when printing Gantt timing charts. The symbol we will create is ASCII 127. This symbol is a hollow, upward-pointing triangle and is used by the on-screen display of Timeline to signify a milestone. However, most font files do not include this character, so we must either make do with a substitute or define our own. When printing a Gantt file to disk, Timeline uses ASCII 127 as the milestone character, so we will edit ASCII 127. Start up FONTEDIT and choose your font file. When you get to the main menu, try displaying ASCII 127. Since it is not represented by a key on the keyboard, you will have to hold down the ALT key, press 127 on the numeric keypad, and then let go of the ALT key. If nothing happens on the screen, this means ASCII 127 is not defined in the font file. You will have to Create a New Character. If so, choose F7 from the main menu. Highlight "127" from the list you see and either click the mouse or press ENTER. You will now be in Pixel Edit mode for ASCII 127. If ASCII 127 already exists in your font file, press F2 from the Main Menu to begin editing it. In Pixel Edit mode, perform the following steps to create a hollow, upward pointing triangle. At all times we will be choosing from the menu options displayed along the top and top right of the screen. - Press F4 to clear the character entirely. - Press F3 to begin Area Operations. - Press F3 to choose a polygon shape. - Go to the top of the character box and mark this as the apex (top) of the triangle by either pressing the left mouse button (if a mouse is installed), or by pressing RETURN (if no mouse is installed). - Go to the lower left corner of the character box and mark it as the lower left corner of the triangle by pressing either the left mouse button or RETURN. - Go to the lower right corner of the character box and mark it as the lower right corner of the triangle by pressing either the left mouse button or RETURN. - Complete the triangle by pressing either the right mouse button (if using a mouse), or F10 (if not using a mouse). - Move the mouse cursor or crosshairs to the interior of the triangle and press F3 to Fill it. We now have a solid, upward pointing triangle on screen. But we want a hollow triangle. So we will repeat the process above for a smaller triangle within the solid triangle, but instead of filling it we will clear it. - Press F3 to choose a polygon shape. - Go to a point about 4 pixels below the apex of the solid triangle and press the left mouse button or RETURN. - Go to a point about 4 pixels above and to the right of the lower left corner of the character box and mark it as the lower left corner of the triangle by pressing either the left mouse button or RETURN. - Go to a point about 4 pixels above and to the left of the lower right FONTEDIT, (C) by Alexander Walter page 23 corner of the character box and mark it as the lower right corner of the triangle by pressing either the left mouse button or RETURN. - Complete the triangle by pressing either the right mouse button (if using a mouse), or F10 (if not using a mouse). - Move the mouse cursor or crosshairs to the interior of the triangle and press F4 to Clear it. - Press ESC to go to Pixel Editing. You can do pixel-by-pixel touchup of the character if you wish. - Press F10 to save your changes At this point we should now have displayed and saved a hollow, upward pointing triangle. We could continue to define new characters, but lets stop; this is enough for a demonstration. - Press ESC to quit. When prompted for confirmation, press "Y". Your fontfile has now been edited to define ASCII 127 as a hollow, upward pointing triangle. Download it to your laser printer as usual, and whenever you print a document using this font, all ASCII 127s will be displayed as a hollow, upward pointing triangle, similar to this: .