home *** CD-ROM | disk | FTP | other *** search
/ ftp.whtech.com / ftp.whtech.com.tar / ftp.whtech.com / club100 / prt / fontfx.do < prev    next >
Text File  |  2006-10-19  |  13KB  |  241 lines

  1. Club 100 Library - 415/939-1246 BBS,    937-5039 NEWSLETTER, 932-8856 VOICE
  2.  
  3.  
  4.           CUSTOMIZING TYPEFACES ON THE EPSON FX PRINTER 
  5.  
  6.                                         Jay Holovacs 
  7.                                         (Address any comments or questions)
  8.                                         95 King George Rd. 
  9.                                         Warren, NJ 07060 
  10.  
  11.  
  12.  
  13.               An excellent feature of the popular Epson FX series of 
  14.           printers is support for user-defined typefaces in printer RAM.  
  15.           For example, once a character set is downloaded into the 
  16.           printer, text from the TEXT utility or a word processor can be 
  17.           printed in the alternate typeface, or even switching back and 
  18.           forth between it and the standard face just as if it were a part 
  19.           of the printer ROM.  This allows for interesting possibilities 
  20.           including special typefaces (old English, extra bold, block, 
  21.           company logo) or even exotic foreign (such as Cyrillic, Hebrew 
  22.           or even 'Klingon' alphabets).  The characters are defined in a 
  23.           manner similar to graphics, however character definition is a 
  24.           separate capability, which can be printed much faster than 
  25.           constructing characters individually from graphics commands.  
  26.           Most of the special features, such as super and subscripts, 
  27.           underlining, emphasized print, proportional print, double strike 
  28.           and pica/elite will work with user supplied character sets. 
  29.               When I first started working with this feature of the 
  30.           printer, I soon found that the major problem with implementing 
  31.           these features as described in the Epson manual is the tedious 
  32.           conversion of pencilled graphics into binary codes follwed by 
  33.           preparation for the actual download into the printer.  To 
  34.           simplify this drudgery, I began to develop FONTFX.BA, a typeface 
  35.           editor program.  FONTFX allows for graphic editing, saving, 
  36.           downloading and modification of typefaces.  Type data can be 
  37.           stored in RAM, cassette or disk files (using Acroatix or 
  38.           Travelling Software DOS) for downloading at the start of a 
  39.           printing session or for future editing.  FONTFX is written for 
  40.           the M100 but is suitable for M200; users may want to modify 
  41.           screen placement to take advantage of the larger screen size, 
  42.           but this is not required. 
  43.  
  44.           RUNNING FONTFX: 
  45.               You will first be prompted for the file name of an existing 
  46.           file to edit.  If this is a new session, simply hit Enter. 
  47.               The next screen is the command line.  Hit E for edit.  You 
  48.           will be prompted for an ASCII value to edit, then for its 
  49.           charistics: whether it is a descender character (such as 'y' or 
  50.           'g') and start and end of the character in dot columns.  To 
  51.           accept default characteristics, simply hit enter at each prompt 
  52.           (65='A', 'No' 0 and 11 are the defaults).  Once these entries 
  53.           are completed, the character is drawn on the screen (blank is 
  54.           default).  The characteristics can be changed later, so normally 
  55.           it is good to start with the defaults when first developing a 
  56.           character. 
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.                                EPSON Typefaces     2  
  68.  
  69.               Once in the Edit mode, the following choices are available 
  70.           as key-commands (use upper case for commands): 
  71.  
  72.             EDIT returns you to the top of the edit screen, the ASCII or 
  73.             characteristics can then be changed. 
  74.  
  75.             FILL the current pixel location (as indicated by the pixel 
  76.             cursors along the top and side of the character frame). 
  77.  
  78.             CLEAR the current pixel. 
  79.  
  80.             BLANK erases the currently selected character. 
  81.  
  82.             MOVE is followed by a choice of 5 subcommands (Up, Down, Right 
  83.             Left and [enter]=abort).  Entering the key command will move 
  84.             the entire shape one pixel in the indicated direction. 
  85.  
  86.             SAVE the current set of character definitions as a file (can 
  87.             be RAM, cassette, or with proper DOS, direct-to-disk). 
  88.  
  89.             LOAD an existing character set file.  Note: if you have 
  90.             characters in the program, they will be overwritten by this 
  91.             command. 
  92.  
  93.             DOWNload the current character set to printer.  You will be 
  94.             given the opportunity to select which ASCII values will be 
  95.             downloaded, also the opportunity to copy the ROM characters 
  96.             into RAM first (this allows default to any standard characters 
  97.             which have not been redefined.) 
  98.  
  99.             TEST prompts for a string, which then will be printed out, for 
  100.             the purpose of evaluating the characters on paper.  You will 
  101.             be able to choose standard or proportional spacing. 
  102.  
  103.             KLONE copies a specified ASCII into another.  This is a useful 
  104.             starting point for characters that are similar such as Q and O. 
  105.  
  106.             QUIT exit program.  If changes have been made since last Save, 
  107.             you will be notified and given a chance to reconsider. 
  108.  
  109.             Use the four ARROW KEYS to manipulate the bit cursor locations. 
  110.  
  111.             KEY COMMANDS which prompt for additional information (Save, 
  112.             Load etc.) can be aborted by entering a null in response to 
  113.             the prompts. 
  114.  
  115.           NOTE: When loading or quitting, a warning message will appear if 
  116.           the character data has been modified since it was last saved, 
  117.           providing the opportunity to save the current definitions before 
  118.           losing them. 
  119.  
  120.           USING YOUR NEW TYPEFACE: 
  121.  
  122.               PIXEL SPACING: The FX printer places a limitation on dot 
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.                                EPSON Typefaces     3  
  134.  
  135.           placement in that dots cannot be directly adjacent right to 
  136.           left, therefore a horizontal gap of at least one pixel must 
  137.           remain between pixels on the same row.  Pixels may be directly 
  138.           vertically or diagonally adjacent.  Even though the white space 
  139.           is quite noticeable on the screen, there is considerable overlap 
  140.           on paper and the result is not nearly so drastic as might be 
  141.           expected.  It is helpful to frequently download and test 
  142.           characters to get an accurate feel for the procedure. 
  143.               Simulating of curved lines and various slopes is not really 
  144.           as difficult as might be imagined from looking at the large 
  145.           character frame.  Use the Download feature frequently at first 
  146.           to get a good feel for the techniques of character description. 
  147.               Once created and saved, typeface files can be downloaded 
  148.           before a printing session by running FONTFX, loading the 
  149.           appropriate file and going directly to the Download command. 
  150.               Once the data is downloaded to the printer, the alternate 
  151.           typeface can be summoned by the sequence 
  152.           CHR$(27);CHR$(37);CHR$(N);CHR$(0).  If N=0 then standard 
  153.           typeface is used, if N=1 then RAM type is used.  Many word 
  154.           processing programs provide a means to embed control sequences 
  155.           like the above directly in your text.  Unfortunately, this 
  156.           command is not directly available in the standard text dump 
  157.           built into the M100 because it has no means to embed a CHR$(0), 
  158.           however the command can be sent from BASIC, then you can switch 
  159.           over to text to utilize the RAM type. 
  160.               DESCENDERS: When a descender is specified in the 
  161.           characteristics, the pixels are entered in the same manner as 
  162.           usual, however the entire frame will be shifted one pixel down 
  163.           on paper when the character is printed. 
  164.               PROPORTIONAL SPACING can be specified when printing with the 
  165.           usual embedded sequence--CHR$(27);CHR$(112);CHR$(1)--however you 
  166.           must supply the proportional information to the printer when 
  167.           editing the typeface.  The characters in the Epson FX consist of 
  168.           12 columns (numbered 0-11) by 8 rows.  The 12th column is always 
  169.           blank.  The user can specify the start and end positions which 
  170.           the printer will use when in porportional mode (in standard mode 
  171.           the full width is always printed). 
  172.               Once you get the character visually the way you like it, 
  173.           center it appropriately in its work area, so that the character 
  174.           will be centered when printing in nonporportional mode as well.  
  175.           Hit E to get back to the top of the editing sequence and 
  176.           re-enter the ASCII.  Determine the first column which will be 
  177.           considered to start the character (it may include one or two 
  178.           blank columns in front of the actual character) and enter this 
  179.           value, then enter the ending column (which must be at least 5 
  180.           greater than the start position).  The character is now ready 
  181.           for proportional printing.  The editor will still accept data 
  182.           for all columns, and this data will be saved in files, but data 
  183.           beyond the last column specified will be ignored by the printer 
  184.           when in proportional mode. 
  185.  
  186.           BOTH DESCENDER DATA AND LENGTH DATA CAN BE CHANGED AS DESIRED BY 
  187.           RE-EDITING A CHARACTER. 
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.                                EPSON Typefaces     4  
  200.  
  201.           COMMENTS ON THE PROGRAM: 
  202.  
  203.               PROGRAM STRUCTURE: In order to keep the program logic 'wide 
  204.           open' for user modification, FONTFX as listed here is clearly 
  205.           not trimmed back in size.  Extensive comments, and mnemonic 
  206.           (rather than 2 character) variable names are used.  Packing this 
  207.           program, either by hand or using a packer program will 
  208.           significantly cut this size if size is critical.  Additionally, 
  209.           the structure is strongly modular in nature, with the purpose of 
  210.           each module defined by its comments.  BASIC by its nature does 
  211.           not enforce structure (as Pascal, C or others), however, taking 
  212.           the effort to construct the program with a structured philosophy 
  213.           from the beginning helps significantly as the program expands 
  214.           beyond its original concept. 
  215.               To keep the file size compact, I have restricted the 
  216.           changeable ASCII's to 33-127 which is the range normally used by 
  217.           text type programs, however the Epson will accept 255 different 
  218.           characters.  By changing DIMensions of CD and altering the value 
  219.           subtracted from CHAR in lines 910 and 911, you can modify to 
  220.           define as many characters as desired. 
  221.               ERRORS: A significant amount of time goes into the design of 
  222.           a typeface, therefore it is important to be able to recover in 
  223.           running condition from an IO error; file errors are fairly 
  224.           extensively trapped, with error messages; the more common file 
  225.           errors will not stop the program. 
  226.               Lines 1615-1620 cover disk access errors (Acroatix, these 
  227.           lines can be user modified for TS or similar DOS) and can be 
  228.           deleted if you are not using the portable disk drive. 
  229.               Line 1690 is a catch-all for miscellaneous errors.  Program 
  230.           execution stops, and if you can fix the problem by changing 
  231.           value of an offending variable (NOT by changing a program line 
  232.           however) and resuming at the same statement, the program can 
  233.           then be CONTinued without losing the current work. 
  234.               Note that line 1608 RESUMEs to line 100 rather than to the 
  235.           subroutine level of the error statement.  From what I can 
  236.           gather, when a memory overflow error occurs, the subroutine 
  237.           stack is lost; and the program must resume at its lowest level 
  238.           (I have only tried this technique on the M100).  All other types 
  239.           of errors that I have encountered can be RESUMEd on the same 
  240.           level from which the error occured. 
  241.