home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / tools / bgi_tool / fe.doc < prev    next >
Text File  |  1989-05-30  |  32KB  |  881 lines

  1.  
  2.                                FE
  3.  
  4.                       A Stroke Font Editor
  5.  
  6.  
  7.  
  8.             Copyright (c) 1988,89 Borland International
  9.  
  10.  
  11.                            Revision 1
  12.  
  13.                             09/29/88
  14.  
  15.  
  16.  
  17.  
  18.  
  19. 1. Introduction
  20. ===============
  21.  
  22. Stroke fonts define characters as a sequence of lines (strokes), as opposed
  23. to bitmap fonts that define characters as a matrix of dots.
  24.  
  25. The advantage of stroke fonts is that they can be scaled to arbitrary sizes
  26. and still maintain full resolution. Bitmap fonts are made for a specific dot
  27. size and do not scale gracefully. For example, if you had a bitmap font for
  28. a 72 dot-per-inch (DPI) dot matrix printer and quadrupled the dots in height
  29. and width to use on a 300 DPI laser printer, you would simply get an
  30. enlargement of the jagged edges inherently present in the 72 DPI font.
  31.  
  32. Stroke fonts, on the other hand, are not converted to dots until the
  33. desired size and resolution of the output device is known. So, if you
  34. wanted to put stroke fonts on a 300 DPI laser printer, the dots that make up
  35. the strokes would be printed at 300 DPI.
  36.  
  37.  
  38. 2. System Requirements
  39. ======================
  40.  
  41. 2.1 Required Hardware
  42. =====================
  43.  
  44. The Font Editor (FE) runs on IBM PCs, PC/XTs, PC/ATs, and most compatibles.
  45.  
  46. FE requires a mouse that supports the Microsoft External Mouse Driver
  47. Interface. This includes the Microsoft, Mouse Systems, and
  48. Logitec mice. (If you'll be using some other mouse, consult your
  49. owner's manual.) The mouse driver must be installed into memory prior
  50. to starting the FE; typically, this is accomplished by installing the
  51. driver as a DOS device driver from your CONFIG.SYS file. Consult your mouse
  52. documentation for details about installing the mouse driver.
  53.  
  54. FE also requires an IBM Enhanced Graphics Adapter (EGA), or compatible, and
  55. a color display. The graphics adapter card must have at least 128K of
  56. display RAM installed.
  57.  
  58.  
  59. 2.2. Optional Hardware
  60. ======================
  61.  
  62. FE supports hardcopy output to one of the following Hewlett-Packard
  63. plotters.
  64.  
  65.         HP 7470
  66.         HP 7475 (8 1/2 x 11 paper only)
  67.         HP 7440 (Color Pro)
  68.  
  69. When using a serial port mouse and using a plotter, two serial ports are
  70. required. Be careful to select the correct port for the plotter before
  71. allowing FE to set the parameters on the serial port.
  72.  
  73. You'll need Hewlett-Packard's standard cable for interfacing a Hewlett-
  74. Packard plotter to an IBM PC; the part number is HP 17255D.
  75.  
  76.  
  77. 3. General Capabilities
  78. =======================
  79.  
  80. FE edits Borland stroke fonts (files with the .CHR extension shipped with
  81. Turbo C and Turbo Pascal). You can read in fonts, edit individual
  82. characters, preview characters onscreen (and optionally on a plotter), and
  83. save the resulting font back to disk.
  84.  
  85.  
  86. 4. FE Display
  87. =============
  88.  
  89. The FE screen is divided into four major areas, each of which is explained
  90. here. Since these areas react slightly differently with the mouse, we'll
  91. talk about mouse use first.
  92.  
  93.  
  94. 4.1 Mouse Conventions
  95. =====================
  96.  
  97. There are two major operations you'll perform with the mouse when using FE.
  98. A "click" is a quick press-and-release of the mouse button when the cursor
  99. is positioned on some object. This "selects" the object.
  100.  
  101. A "drag" is a press, hold, and move operation used to slide objects or
  102. define areas. When sliding objects, the object sticks to the mouse cursor
  103. after a button is depressed and stays with the cursor until the button is
  104. released.
  105.  
  106. FE makes no distinction between the left and right mouse buttons; they are
  107. completely equivalent.
  108.  
  109.  
  110.     4.1.2 Defining Areas
  111.     ====================
  112.  
  113.     When defining an area, the location where a mouse button is depressed
  114.     defines one corner of a rectangle. The diagonally opposite corner is
  115.     defined by where the button is released. So when you are defining a
  116.     rectangle, one corner is defined (and cannot be changed) when the
  117.     mouse button goes down. The other corner can be changed while you
  118.     continue to hold the button down and move the mouse.
  119.  
  120.  
  121.     4.1.3 In the Character Window
  122.     =============================
  123.  
  124.     When the mouse pointer is in the character window, you'll find that it
  125.     moves jerkily. This is because the pointer is restricted to only those
  126.     grid intersection points where strokes can start and stop. These grid
  127.     points will be closer together or farther apart, depending on how
  128.     "Zoomed In" you are. These points will be visible if you use the Grid
  129.     command under Window.
  130.  
  131.  
  132.     4.1.4 Escape From Plotting
  133.     ==========================
  134.  
  135.     Pressing the mouse button during a plotting operation terminates the
  136.     plotter dump. Therefore, you may have to hold the mouse down for a few
  137.     seconds until the status of the button is read. Plotting may continue
  138.     for a time (as long as a minute on some plotters) because the plotter
  139.     continues to obey drawing commands in its internal buffer.
  140.  
  141.  
  142. 4.2. The Character Window
  143. =========================
  144.  
  145. The character window is the large rectangular area on the left half of
  146. the screen where character editing takes place. FE shows you the strokes
  147. that comprise a character, and you may add or delete strokes to a character
  148. by manipulating the mouse in this window.
  149.  
  150. Strokes are added or deleted by moving the mouse cursor to the desired
  151. starting point, pressing the button, and dragging to the desired endpoint.
  152. If no stroke connected these points previously, then a new stroke is added;
  153. if one did, then it is deleted.
  154.  
  155. If you wish the stroke to bend (in effect making multiple strokes), you
  156. must release and press the mouse button to end a stroke and start another
  157. stroke.
  158.  
  159. Again, drawing a line where there was none before will add a stroke to the
  160. character definition. Drawing a line on top of an existing line erases
  161. that line from the character definition.
  162.  
  163. Combinations of adding and deleting strokes can be performed with a single
  164. line. For example, drawing a line on the middle part of an existing line
  165. causes the middle part to be erased and leave two lines corresponding
  166. to the two end parts that were not drawn upon.
  167.  
  168. There is a small triangle along the baseline labeled with a 'b' on the left
  169. end. This marker shows where the next character will start and controls
  170. the intercharacter spacing. This width can be changed by dragging the
  171. intercharacter spacing triangle to a new position.
  172.  
  173.  
  174. 4.3. The Menu
  175. =============
  176.  
  177. The menu bar is the line of text at the top of the screen. Items in the
  178. menu are selected by a mouse click.
  179.  
  180. Some items in the menu perform a single function and, when the function is
  181. completed, display the same menu; examples of this are Load and Save. Other
  182. items display a new menu that always contains an item labeled Exit. Clicking
  183. the Exit item returns you to the your last menu location; Edit is an
  184. example.
  185.  
  186. The Quit item in the main menu returns you to DOS. If you've made changes
  187. to the font, you'll be asked whether you want to save them before quitting.
  188.  
  189.  
  190. 4.4. The Character Selector
  191. ===========================
  192.  
  193. The character selector is the large rectangular area on the right of
  194. the screen containing a display of all the characters in IBM's extended
  195. ASCII character set. Clicking on a character within this box changes the
  196. current working character.
  197.  
  198. The characters shown in green have strokes defined for them. The
  199. characters shown in red have no stroke definition yet. The character
  200. currently being edited is shown in either bright red or bright green,
  201. depending upon whether it has strokes defined.
  202.  
  203. Additions or deletions to the current character are never applied until
  204. you indicate to add the new strokes. If you have made changes to the
  205. current character, you're prompted whether the new strokes are to be added
  206. (or subtracted) from the current character when you click on a character in
  207. the character selector window. If you click on Yes, the character definition
  208. will be updated. If you click on No, the new strokes will be discarded.
  209.  
  210. Alternatively, you may reclick on the current character simply to force an
  211. update from time to time.
  212.  
  213.  
  214. 4.5. The Small Character
  215. ========================
  216.  
  217. For at-a-glance information, the area in the lower right-hand corner of
  218. the screen displays a small version of the current character; nothing is
  219. selectable here.
  220.  
  221.  
  222. 4.6. The Update Selector Box
  223. ============================
  224.  
  225. This box appears on the right-hand side of the screen, above the character
  226. selector window and below the menu area. While editing a character, the
  227. changes made to a character are saved in a edit buffer. To make the edits
  228. permanent, the user must use the mouse to select the Update area. This
  229. writes the edit buffer to the actual character. If you've made changes to
  230. a character without updating the edit buffer, then you'll be prompted
  231. to update the character when you select a new character.
  232.  
  233. !!!!! NOTE !!!!!
  234.  
  235. The edit actions on characters only affect the character data, not the
  236. edit buffer; for example, when you add several lines to a character
  237. but don't update the character. If you select edit and move the character,
  238. only the information in the character buffer is affected. The new lines
  239. added to the character will not be moved. This applies to all edit
  240. functions, including move, flip, flop, reverse, shift, cut, and copy.
  241.  
  242.  
  243. 5. Editing Tools
  244. ================
  245.  
  246. This section briefly describes the editing tools available in FE. The
  247. next section, "Command Reference," provides complete command descriptions.
  248.  
  249.  
  250. 5.1. Single Strokes
  251. ===================
  252.  
  253. Single strokes can be added or deleted from a character by moving the mouse
  254. cursor into the character window and performing a drag operation between
  255. the grid points where the stroke should be added or deleted.
  256.  
  257. As you drag the mouse, you'll notice the line being drawn. The start point
  258. begins where you first pressed the mouse button; the endpoint follows the
  259. mouse cursor. This process is known as "rubber banding" a line because the
  260. line appears to be a rubber band that stretches or shrinks to follow the
  261. cursor.
  262.  
  263. Strokes can be deleted by drawing over existing strokes.
  264.  
  265. Note that if you move the mouse cursor outside the character while rubber
  266. banding a line, the stroke will be "canceled."
  267.  
  268.  
  269. 5.2. Groups of Strokes
  270. ======================
  271.  
  272. Groups of strokes can be manipulated as a single object using the Edit,
  273. Clipboard commands. Many characters share the same stroke groups. For
  274. example, the strokes that define the left-hand part of a 'c' will probably
  275. be the same as those in the left-hand part of a 'd.'
  276.  
  277. The tools available in the Clipboard menu allow you to select a group of
  278. strokes from a character and use them again in that character or another
  279. character. Cut and Copy move a group of characters into a holding buffer
  280. (the Clipboard). Cut removes the strokes from the current character, while
  281. Copy leaves the originals undisturbed.
  282.  
  283. You can determine the characters to go onto the Clipboard by rubber banding
  284. a rectangle around the strokes. Both endpoints of a given stroke must be
  285. completely inside the rectangle in order to be selected for a Cut or Copy.
  286.  
  287. You can paste the strokes in the Clipboard into a character by selecting
  288. Paste. The contents of the Clipboard are drawn in the character window.
  289. You may move the strokes with a dragging operation.
  290.  
  291. Paste doesn't empty the Clipboard; the next paste operation will find the
  292. same strokes. Cut and Copy always change the contents of the Clipboard.
  293. Delete operates like Cut except that the Deleted strokes do not go onto
  294. the Clipboard, they are just discarded. Move is similar to a combined Cut
  295. and Paste operation except that the contents of the Clipboard are not
  296. altered.
  297.  
  298. You may also Flip the contents of the Clipboard using the commands under
  299. Edit, Flip. These may be used to flip the Clipboard contents upside down
  300. (along a horizontal axis), or right and left (along a vertical axis).
  301.  
  302.  
  303. 5.3. Whole Characters
  304. =====================
  305.  
  306. There are some special techniques for manipulating whole characters.
  307.  
  308. CopyChar, under the Edit menu, allows you to copy from one character within
  309. a single font to another.
  310.  
  311. Flip, under the Edit menu, allows you to flip a character upside down, or
  312. right and left, or both by using both commands.
  313.  
  314. Shift, under the Edit menu, allows you to move a whole character right,
  315. left, up, or down.
  316.  
  317. For example, the characters, b, d, p, and q are usually just flipped
  318. versions of one another. You can draw one and use CopyChar and Flip to
  319. make the other three.
  320.  
  321.  
  322. 5.4. Whole Fonts
  323. ================
  324.  
  325. The commands under Global allow you to perform operations on the entire
  326. font. These are primarily concerned with intercharacter spacing. Usually,
  327. these commands are used as a part of the final editing process of a font.
  328.  
  329. LeftSpace moves every character in the font so that its leftmost part
  330. is the specified distance from the dark solid vertical line in the
  331. character window.
  332.  
  333. RghtSpace sets the character spacing marker of every character in the
  334. font so that it is the specified distance from rightmost part of the
  335. character.
  336.  
  337. BaseLine shifts every character up or down by the same amount so that
  338. the base line corresponds to zero.
  339.  
  340. Copy allows you to select another font and copy characters from it into
  341. the font on which you are currently working. Many characters will not
  342. change from one font to another, such as the graphics characters. This
  343. command allows you to copy them.
  344.  
  345.  
  346. 6. Command Reference
  347. ====================
  348.  
  349. This section describes each command/function in detail.
  350.  
  351.  
  352. 6.1. Load
  353. =========
  354.  
  355. The Load command loads an existing font file into FE. A large rectangle
  356. will be drawn on the screen that contains two mouse-sensitive areas: the
  357. the file selector area and the file prompt line.
  358.  
  359. Clicking on the file prompt line allows you to enter a new file name
  360. for loading. This prompt may include a new path. You will be warned if the
  361. file name entered does not exist. If you confirm that the file does not
  362. exist, the file will be created and will become the default output file
  363. when the font is saved.
  364.  
  365. The file selector area contains a list of all of the files on the current
  366. drive and in the current directory that have the extension .CHR. As you
  367. move the mouse cursor over these, you'll see them appear on the file prompt
  368. line. Clicking on one of these names will select the name as the current
  369. file to load.
  370.  
  371.  
  372. 6.2. Show
  373. =========
  374.  
  375. The tools under Show simply display how your font looks. They do not
  376. change the font.
  377.  
  378.  
  379.     6.2.1. Font
  380.     ===========
  381.  
  382.     This tool shows all of the currently defined characters on the
  383.     monitor. This is useful to do a quick check of the intercharacter
  384.     spacing. Overlapping characters or gaps between characters indicate
  385.     improper intercharacter spacing.
  386.  
  387.  
  388.     6.2.2. String
  389.     =============
  390.  
  391.     This tool allows you to type the characters that you want to display;
  392.     For instance, this can be useful when you want to display two special
  393.     characters together to determine appearance and spacing.
  394.  
  395.     When the current line becomes full, you'll automatically go to the next
  396.     line. You can also press the Enter key to force a new line.
  397.  
  398.     The display will not scroll when you reach the bottom; you must press
  399.     the Esc key to get out of String mode.
  400.  
  401.  
  402.     6.2.3. Plotter
  403.     ==============
  404.  
  405.     This tool draws the current font on an HP plotter. Refer to the
  406.     section entitled "Optional Hardware" for a discussion about con-
  407.     necting the plotter.
  408.  
  409.     When you select this tool, you're asked if the plotter is COM1 or
  410.     COM2. Then the serial port on the PC must be configured to communicate
  411.     with the plotter. You can either let FE set the serial port to 9600
  412.     baud, even parity, 7 data bits, and 1 stop bit, in which case the DIP
  413.     switches on your plotter must be set this way, or you can skip this
  414.     step.
  415.  
  416.     If you do not let FE initialize the serial port, then you must have
  417.     previously issued the DOS mode command prior to starting FE to match
  418.     your plotter's switch settings.
  419.  
  420.     If you're using a serial mouse, be careful not to choose the serial
  421.     port to which your mouse is connected.
  422.  
  423.     Finally, you'll be asked whether you want to plot to the plotter. Have
  424.     the paper loaded and the plotter ready before selecting yes.
  425.  
  426.     If you start plotting and want to stop before all your plotting is
  427.     complete, press and hold down a mouse button until the screen clears.
  428.  
  429.     Your plotter output will be labeled with the name of the file from
  430.     which it came, and the page number. In the case of multiple page
  431.     plots, FE will stop at the end of each page to allow you to load a new
  432.     piece of paper.
  433.  
  434.  
  435.     6.2.4. Exit
  436.     ===========
  437.  
  438.     This choice returns you to the main menu.
  439.  
  440. 6.3. Global
  441. ===========
  442.  
  443. The commands under Global operate on an entire font, unlike many of the
  444. other commands that operate on a single character or stroke.
  445.  
  446.  
  447.     6.3.1. LeftSpace
  448.     ================
  449.  
  450.     The LeftSpace choice adjusts the space between the leftmost part of a
  451.     character and the vertical guide line shown in the character window.
  452.     Typically, this should be set to zero for all fonts so that an
  453.     application that mixes fonts will maintain character spacing between a
  454.     font change.
  455.  
  456.     6.3.2. RghtSpace
  457.     ================
  458.  
  459.     The RghtSpace choice adjusts the character width mark of all the
  460.     characters to the desired value. The character width value set for
  461.     each character is the number selected from the menu, plus the rightmost
  462.     stroke of the character. Therefore this choice gives uniform
  463.     intercharacter spacing to a proportionally spaced font.
  464.  
  465.     Typically, you'll use this to prpoportionally space the entire font.
  466.     Some characters are "fixed up" individually, such as the numeric 
  467.     characters and the graphics character symbols; these may all get the
  468.     same total width so that they line up in columns.
  469.  
  470.  
  471.     6.3.3. BaseLine
  472.     ===============
  473.  
  474.     The BaseLine choice adjusts each character in the font upward or
  475.     downward by the same amount. Use this choice for each font so that
  476.     all fonts refer to the same base line value. Thus, an application-
  477.     switching font will not have the baseline of the new font shifted up
  478.     or down from the previous font.
  479.  
  480.  
  481.     6.3.4. Copy
  482.     ===========
  483.  
  484.     Global Copy allows you to copy characters from a different font file.
  485.     You will be asked to select a source font file, just like when using
  486.     Load.
  487.  
  488.     Once you've selected a source font file, you'll see two character
  489.     selector boxes on the screen. The left box corresponds to the source
  490.     font file that you just selected. The right box corresponds to the font
  491.     on which you are currently working.
  492.  
  493.     You can copy a character by clicking on the character you want from
  494.     the source character box and then clicking on the character to which
  495.     it should be copied in the destination character box.
  496.  
  497.     When you've finished, you select Done in the menu area.
  498.  
  499.  
  500.     6.3.5. Exit
  501.     ===========
  502.  
  503.     This choice returns you to the main menu.
  504.  
  505.  
  506. 6.4. Edit
  507. =========
  508.  
  509.     The tools under Edit are for editing whole characters or groups of
  510.     strokes. The Clipboard function under this heading are of particular
  511.     importance.
  512.  
  513.  
  514.     6.4.1. CopyChar
  515.     ===============
  516.  
  517.     This tool allows you to do intrafont copying of characters. Selecting
  518.     this tool prompts you to select the source character and then the
  519.     destination character.
  520.  
  521.     If a character already exists where you selected the destination
  522.     character, then you'll be asked if that character should be replaced.
  523.  
  524.  
  525.     6.4.2. Flip
  526.     ===========
  527.  
  528.     This tool flips either the current character or the contents of the
  529.     Clipboard.
  530.  
  531.     Characters are flipped within the space that they occupy. For
  532.     example, if a character only occupied the lower portion of its
  533.     character cell, then the result of flipping it vertically will only
  534.     occupy the lower portion of the character cell. You can use the Shift
  535.     tool to change this if it's not what you want.
  536.  
  537.     Note that you won't see the results of flipping the Clipboard until you
  538.     paste from the Clipboard.
  539.  
  540.  
  541.     6.4.3. Shift
  542.     ============
  543.  
  544.     This tool shifts a character one dot in any direction. It does not
  545.     modify the intercharacter spacing.
  546.  
  547.  
  548.     6.4.4. ShowAlso
  549.     ===============
  550.  
  551.     This tool lets you superimpose another character over the one on which
  552.     you are currently working. This character stays drawn until you select
  553.     Update or change the current character.
  554.  
  555.  
  556.     6.4.5. Clipboard
  557.     ================
  558.  
  559.     The Clipboard contains all the tools for working on groups of strokes.
  560.     Cut, Copy, and Paste work by reading and writing a temporary storage
  561.     area called the Clipboard. Move and Delete do not use the Clipboard.
  562.  
  563.     Strokes are selected from the current character by rubber banding a
  564.     rectangle around them. One corner of the rectangle is defined by
  565.     where you press a mouse button. The diagonally opposite corner is
  566.     defined by where you release the mouse button.
  567.  
  568.     Both endpoints of the stroke must be completely within the rectangle
  569.     in order to be selected.
  570.  
  571.     For the Move and Paste options, when a region has been defined, the
  572.     strokes contained in the region are copied within the window to the
  573.     right of the character width marker. The upper left corner of the
  574.     strokes become attached to the mouse cursor when you press a mouse
  575.     button. They stay attached until you release the mouse button.
  576.  
  577.  
  578.     6.4.5.1. Cut
  579.     ============
  580.  
  581.     Cut removes the selected strokes from the current character and places
  582.     them on the Clipboard. The previous contents of the Clipboard are
  583.     lost.
  584.  
  585.  
  586.     6.4.5.2. Copy
  587.     =============
  588.  
  589.     Copy copies the selected strokes from the current character to the
  590.     Clipboard. The current character is not changed. The previous contents
  591.     of the Clipboard are lost.
  592.  
  593.  
  594.     6.4.5.3. Paste
  595.     ==============
  596.  
  597.     Paste copies the contents of the Clipboard to the current character.
  598.     The contents of the Clipboard are not changed.
  599.  
  600.  
  601.     6.4.5.4. Move
  602.     =============
  603.  
  604.     Move moves the selected strokes to a new location. The contents of the
  605.     Clipboard are not changed. This is equivalent to a Cut and Paste
  606.     except that the contents of the Clipboard are not changed.
  607.  
  608.  
  609.     6.4.5.5. Delete
  610.     ===============
  611.  
  612.     Delete cuts the selected strokes from the current character. This is
  613.     equivalent to a Cut except that the contents of the Clipboard are not
  614.     changed.
  615.  
  616.  
  617.     6.4.5.6. Exit
  618.     =============
  619.  
  620.     This choice returns you to the Edit menu.
  621.  
  622.  
  623.     6.4.6. Exit
  624.     ===========
  625.  
  626.     This choice returns you to the main menu.
  627.  
  628.  
  629. 6.5. Save
  630. =========
  631.  
  632. The Save command stores the current font data to an output file. The Save
  633. menu draws a large rectangle on the screen that contains two mouse-
  634. sensitive areas: the file selector area and the file prompt line.
  635.  
  636. Clicking on the file prompt line allows you to enter a new file name
  637. for saving. This prompt may include a new path. You'll be warned if the
  638. file name entered does not exist. If you confirm that the file does not
  639. exist, the file will be created.
  640.  
  641. The file selector area contains a list of all of the files on the current
  642. drive and in the current directory that have the extension .CHR. As you
  643. move the mouse cursor over these you see them appear on the file
  644. prompt line. Clicking on one of these names selects the name as the
  645. current destination file.
  646.  
  647.  
  648. 6.6. Window
  649. ===========
  650.  
  651. All of the tools under Window control how the character editing window is
  652. displayed. These tools don't change the characters, only the way that
  653. they are displayed. All of the values herein are set automatically when
  654. you load a font file.
  655.  
  656. You'll need to set these values if you start with a new font file, that is,
  657. bypass Load.
  658.  
  659.  
  660.     6.6.1. Zoom Out
  661.     ===============
  662.  
  663.     This tool reduces the magnification used to display the character
  664.     in the character editing window.
  665.  
  666.     The magnification is automatically set to show all characters in the
  667.     character window as large as possible when the font file is loaded.
  668.  
  669.  
  670.     6.6.2. Zoom In
  671.     ==============
  672.  
  673.     This tool increases the magnification used to display the character
  674.     in the character editing window.
  675.  
  676.     The magnification is automatically set to show all characters in the
  677.     character window as large as possible when the font file is loaded.
  678.  
  679.     You can increase the magnification set by Load so that the characters
  680.     are larger than the window. Parts of characters that would be outside
  681.     the window are clipped to the window limits.
  682.  
  683.     You may want to do this while working on lowercase letters or the
  684.     strokes that make up the serif of a serif font.
  685.  
  686.  
  687.     6.6.3. Origin
  688.     =============
  689.  
  690.     This tool allows you to position the origin guide line anywhere within
  691.     the character editing window.
  692.  
  693.     For most fonts, this is drawn underneath the baseline guide line and
  694.     won't be visible, however, it is still movable.
  695.  
  696.     To work on descending strokes, move toward the top of the window and
  697.     zoom in. To work on uppercase letters, move this to the bottom of the
  698.     window.
  699.  
  700.  
  701.     6.6.4. d-ht
  702.     ===========
  703.  
  704.     This tool positions the descender height guide line in the character
  705.     editing window. It has no effect on the character, its edits, or
  706.     display of the character in the window; it's simply for your
  707.     convenience.
  708.  
  709.  
  710.     6.6.5. b-ht
  711.     ===========
  712.  
  713.     This tool positions the baseline height guide line in the character
  714.     editing window. It has no effect on the character, its edits, or
  715.     display of the character in the window; it's simply for your
  716.     convenience.
  717.  
  718.  
  719.     6.6.6. x-ht
  720.     ===========
  721.  
  722.     This tool positions the x-height guide line in the character editing
  723.     window. It has no effect on the character, its edits, or display of the
  724.     character in the window; it's simply for your convenience.
  725.  
  726.  
  727.     6.6.7. c-ht
  728.     ===========
  729.  
  730.     This tool positions the character height guide line in the character
  731.     editing window. It has no effect on the character, its edits, or
  732.     display of the character in the window; it's simply for your
  733.     convenience.
  734.  
  735.  
  736.     6.6.8. ShowMovs
  737.     ===============
  738.  
  739.     This tool shows each move, draw, draw, ...  sequence in a different
  740.     color so that you can see how the character stroke is created.
  741.  
  742.     Don't use turning this option on when drawing in the character
  743.     editing window; the results are not favorable. 
  744.  
  745.     This option defaults to off.
  746.  
  747.  
  748.     6.6.9. Grid
  749.     ===========
  750.  
  751.     This tool shows the grid of points in the character being editing on
  752.     which strokes begin and end.
  753.  
  754.     This option defaults to on.
  755.  
  756.  
  757.     6.6.10. Exit
  758.     ============
  759.  
  760.     This choice returns you to the main menu.
  761.  
  762.  
  763. 6.7. Quit
  764. =========
  765.  
  766. This choice returns you to DOS; you will be asked if you want to save any
  767. edits.
  768.  
  769.  
  770.  
  771.  
  772. 7.  Beginning a New Font from Scratch
  773. =====================================
  774.  
  775. There are a few considerations for the user who wishes to start a new font
  776. from scratch. To begin a new font, start FE and select a new font file name.
  777. The screen shows a character window without any characters defined. The
  778. four global parameters for the font are determined automatically by the font
  779. editor when a file is loaded or saved. These parameters are the Base
  780. Height, the Capital Height, the Descender Height, and the Lowercase Height
  781. (or x Height). The values for these are determined by examining the
  782. characters a typographer would use to determine the same information.
  783.  
  784. Capital Height:
  785.   This value is determined by examining the E Ligature character (144
  786.   decimal). This is the tallest of the European characters. If this
  787.   character is undefined, the capital M is used as the capital height.
  788.   If neither of these characters are defined, the value will default to
  789.   40 (of a maximum of +/-64).
  790.  
  791. Base Height:
  792.   This value is determined by examining the E Ligature or the Capital
  793.   M. This value is used as the origin for the other three dimensions.
  794.   If neither of these characters are defined, the value will default to
  795.   0 (of a maximum of +/-64).
  796.  
  797. Descender Height:
  798.   This value is determined be examining the lowercase 'q' letter. If
  799.   the lowercase 'q' is undefined, the value will default to -7 (of a
  800.   maximum of +/-64).
  801.  
  802. LowerCase Height (or x Height):
  803.   This value is determined by examining the lowercase 'x' letter. If
  804.   the lowercase 'x' is undefined, the value will default to the Capital
  805.   Height divided by two.
  806.  
  807.  
  808. To define the size and placement of the characters in the font, it is best
  809. to define the 'M', 'q', 'x', and E Ligature (if desired) as the first
  810. characters. The next time the font is loaded, the character dimensions will
  811. be used to define the size and placement of the character window for the
  812. font.
  813.  
  814.  
  815.  
  816.  
  817.                            Appendix 1
  818.  
  819.                      BGI Stroke File Format
  820.  
  821. The structure of Borland .CHR (stroke) files is as follows:
  822.  
  823. ;  offset 0h is a Borland header:
  824. ;
  825.         HeaderSize      equ     080h
  826.         DataSize        equ     (size of font file)
  827.         descr           equ     "Triplex font"
  828.         fname           equ     "TRIP"
  829.         MajorVersion    equ     1
  830.         MinorVersion    equ     0
  831.  
  832.         db      'PK',8,8
  833.         db      'BGI ',descr,'  V'
  834.         db      MajorVersion+'0'
  835.         db      (MinorVersion / 10)+'0',(MinorVersion mod 10)+'0'
  836.         db      ' - 19 October 1987',0DH,0AH
  837.         db      'Copyright (c) 1987 Borland International', 0dh,0ah
  838.         db      0,1ah                           ; null & ctrl-Z = end
  839.  
  840.         dw      HeaderSize                      ; size of header
  841.         db      fname                           ; font name
  842.         dw      DataSize                        ; font file size
  843.         db      MajorVersion,MinorVersion       ; version #'s
  844.         db      1,0                             ; minimal version #'s
  845.  
  846.         db      (HeaderSize - $) DUP (0)        ; pad out to header size
  847.  
  848. At offset 80h starts data for the file:
  849.  
  850. ;               80h     '+'  flags stroke file type
  851. ;               81h-82h  number chars in font file (n)
  852. ;               83h      undefined
  853. ;               84h      ASCII value of first char in file
  854. ;               85h-86h  offset to stroke definitions (8+3n)
  855. ;               87h      scan flag (normally 0)
  856. ;               88h      distance from origin to top of capital
  857. ;               89h      distance from origin to baseline
  858. ;               90h      distance from origin to bottom descender
  859. ;               91h-95h  undefined
  860. ;               96h      offsets to individual character definitions
  861. ;               96h+2n   width table (one word per character)
  862. ;               96h+3n   start of character definitions
  863. ;
  864. The individual character definitions consist of a variable number of words
  865. describing the operations required to render a character. Each word
  866. consists of an (x,y) coordinate pair and a two-bit opcode, encoded as shown
  867. here:
  868.  
  869. Byte 1          7   6   5   4   3   2   1   0     bit #
  870.                op1  <seven bit signed X coord>
  871.  
  872. Byte 2          7   6   5   4   3   2   1   0     bit #
  873.                op2  <seven bit signed Y coord>
  874.  
  875.  
  876.           Opcodes
  877.  
  878.         op1=0  op2=0  End of character definition.
  879.         op1=1  op2=0  Move the pointer to (x,y)
  880.         op1=1  op2=1  Draw from current pointer to (x,y)
  881.