home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: Graphics / Graphics.zip / gif_text.zip / gif_text.doc < prev    next >
Text File  |  1999-08-16  |  74KB  |  1,617 lines

  1. 22 June 1999
  2. Contact: danielh@econ.ag.gov
  3.  
  4.               GIF_TEXT: A Graphical Text Generator for the WWW
  5.  
  6. GIF_TEXT, ver 1.3b, is a WWW utility that will convert text strings into
  7. .GIF images "on the fly".  Using one of the several included 
  8. "alphabytes" it's easy to make attractive banners, headers,
  9. and other messages for your web site.  For example, GIF_TEXT
  10. can dynamically generate the time and date -- you can use GIF_TEXT as a 
  11. graphical digital-clock.
  12.  
  13. To use GIF_TEXT you should have access to a web server running under
  14. OS/2.  GIF_TEXT is optimized to work with the free SRE-http Web Server;
  15. but you can use it with any  OS/2 web server that understands CGI-BIN.  
  16.  
  17. Alternatively, you can run GIF_TEXT from an OS/2 command line.  Although
  18. the user interface is somewhat primitive (it is not GUI), it is quite
  19. adequate for quick creation of simple images.
  20.  
  21. Once installed GIF_TEXT is easy to invoke.  For example, you can use the 
  22. included MKGIFTXT.HTM html document as a front-end (or MKGIFRM.HTM --
  23. a javascript/frames enabled version of MKGIFTXT.HTM). 
  24.  
  25. Or, you can include an in-line image html element in your HTML document.  
  26. For example:
  27.   <IMG src="/GIF_TEXT?font=enviro&text=HELLO&width=300">
  28. will generate a 300 pixel wide image with the word "HELLO" (not including
  29. the quotes) written using the "enviro" alphabyte.
  30.  
  31. For those of you who don't have direct access to a web server (i.e.; depend
  32. on an ISP), but are running OS/2, you can use GIF_TEXT in stand-alone mode.
  33. The user interface is primitive, and there is no direct graphics display, but 
  34. it will produce fine output (which you can then view with a graphics viewer). 
  35. Thus, you could use GIF_TEXT to create your images, and then FTP them
  36. to your home page at your ISP.
  37.  
  38. And, of course, GIF_TEXT is free (though you should read the 
  39. acknowledgments section regarding RXGD101.DLL and the various
  40. "alphabytes").
  41.  
  42. Note: You can get the latest version of GIF_TEXT from       
  43.       http://www.srehttp.org/apps/gif_text/      
  44.  
  45.  
  46.  
  47. ------------------------------------------------------
  48. Table of Contents:
  49.  
  50. I. Installaton
  51. II. Using GIF_TEXT
  52.   IIa. Short descripton of Request Options
  53.   II.b Long description of Request Options
  54.      IIb.1  Required options
  55.      IIb.2  Recommended options
  56.      IIb.3  Useful options
  57.      IIb.4  Infrequently used options
  58. III. Technical notes
  59.   IIIa. Basic File matching algorithim
  60.   IIIb. Adding an alphabyte
  61.   IIIc. Adding a  background
  62.   IIId. Adding a complete font
  63.   IIIe. Adding a TTF font
  64.   IIIf. Caching images
  65.   IIIg. On using GIF_TEXT as a "hit counter"
  66.   IIIh. Using color slides 
  67.   IIIi. Switching fonts in mid-message
  68.  
  69. IV. Sample of a FONT_INDEX
  70.   IVa. Multiple variants of a "complete font"
  71.   IVb. Example of adding a new alphabyte
  72.  
  73. V. Acknowledgments
  74.  
  75. ------------------------------------------------------
  76. I. Installation
  77.  
  78.  
  79. Installation of GIF_TEXT requires that you copy a few files to a
  80. few directories, and make a small modification to one of these files.
  81. Alternatively, if you are installing GIF_TEXT as an SRE-http addon,
  82. the INSTALL.CMD installation program will take care of these details
  83. for you.
  84.  
  85.  
  86. NOTE TO UPGRADERS FROM EARLIER VERSIONS OF GIF_TEXT:
  87.     Prior to 1.2e, GIF_TEXT used a version of the RXGDUTIL library
  88.     that lacked several special functions.
  89.     If you've already installed an earlier version of GIF_TEXT, 
  90.     you'll might have to reboot your server before copying RXGDUTIL.DLL 
  91.     to the appropriate directory (i.e.; your C:\OS2\DLL directory).
  92.  
  93.     Furthermore, GIF_text now can read TTF font files -- you no longer have
  94.     to create a "complete font image map" from a TTF font file.  To use
  95.     these feature, you must set the TTF_FONT_DIR parameter in GIF_TEXT.CMD
  96.     (SRE-http users can let INSTALL.CMD do it for you)
  97.  
  98. To install GIF_TEXT:
  99.  
  100. 1) UNZIP GIF_TEXT.ZIP in an empty temporary directory.
  101.  
  102. 2a) If you are installing GIF_TEXT as an SRE-http addon:
  103.       you can run the INSTALL.CMD program (located in the 
  104.       directory created in step 1 above).
  105.  
  106. 2b.1) Otherwise, you can do it by hand...
  107.  
  108.    For SRE-http users Copy GIF_TEXT.CMD and MKGIFTXT.CMD to your "SRE-http
  109.    addon" directory (i.e.; D:\GOSERVE\ADDON).
  110.    For other, CGI-BIN capable servers:
  111.       Copy GIF_TEXT.CMD and MKGIFTXT.CMD to your CGI-BIN scripts directory.
  112.  
  113. 2b.2) Copy RXGDUTIL.DLL and RXTTF.DLL to a directory in the 
  114.       OS/2 LIBPATH (for example, C:\OS2\DLL). 
  115.       Or, if you are running SRE-http, copy it to your 
  116.       "GoServe working directory".
  117.  
  118.    UPGRADERS -- you might have to reboot your machine if an older
  119.    version of RXGDUTIL.DLL has been "locked into memory" by a prior use.
  120.  
  121. 2b.3) Create an ALPHABYT directory (say, as a subdirectory of your
  122.      GOSERVE directory). 
  123.      Copy ALPHABYT.ZIP  to this ALPHABYT directory.
  124.                  Note: ALPHABYT.ZIP is over 1M bytes.
  125.      Example for SRE-http users: create D:\GOSERVE\ALPHABYT
  126.  
  127. 2b.4) CD to this ALPHABYT directory, and UNZIP ALPHABYT.
  128.    UNZIP will create several subdirectories under ALPHABYT, containing sample
  129.    "alphabytes", "complete fonts', backgrounds, buttons, and color slides.
  130.  
  131. 2b.5) With your favorite text editor, edit GIF_TEXT.CMD.  You MUST
  132.         i) set the value of the GIF_DIR_ROOT variable to 
  133.            be the above "ALPHABYT" directory
  134.        ii) set the value of the TTF_DIR_ROOT to point to a directory
  135.            containing TTF fonts.
  136.       iii)  You might also want to change some of the other values.
  137.  
  138.    Notes:
  139.       *  in addition to being the "root" of the alphabytes, etc.; 
  140.          GIF_TEXT uses this GIF_DIR_ROOT directory for temporary storage.
  141.       *  on most systems, the x:\os2\mdos\winos2\system directory contains 
  142.          several ttf fonts.
  143.  
  144. 2b.6) To setup the  (optional) MkGifTxt "web callable front end":
  145.     a) Copy MkGifTxt.HTM, MkGifTx2.HTM and MkGifTx3.HTM to a web 
  146.        accessible directory (i.e.; the GoServe data directory).
  147.        Also, copy the "frames enabled version", MKGiFRM.HTM and 
  148.        MkGifTOC.HTM, to this directory.
  149.     b) Copy SAMPGIF.ZIP to the IMGS\ subdirectory under the root
  150.            of your web directory (for GoServe/SreHttp users: IMGS\ should
  151.            be under the GoServe data directory).
  152.        CD to this IMGS\ subdirectory, and UNZIP SAMPGIF.
  153.     c) If you are using SRE-http, and you want to run MkGifTxt as
  154.        an "addon" (rather then as a cgi-bin script) -- you'll need to 
  155.        make a very simple change to MkGifTxt.HTM --- see MkGifTxt.HTM
  156.        for details.
  157.     d) There are several parameters in MKGIFTXT.CMD that you
  158.        should change. For example, to use "style" files, you'll need
  159.        to set the STYLES_DIR parameter in MkGifTxt.CMD. Also,
  160.        to use the "list fonts, etc" options, make sure the MKGIFTXT.CMD
  161.        settings for GIF_DIR_ROOT and TTF_DIR_ROOT match those in
  162.        GIF_TEXT.CMD.
  163.  
  164. 2b.f)To setup the (optional) MkBUTTON "front end"
  165.     a) Copy MKButton.HTM to a web accessible directory 
  166.     b) Copy ALLBUT1.GIF to the IMGS\ subdirectory under the root
  167.            of your web directory.
  168.     c) If you are using SRE-http, and you want to run MKButton as
  169.        an "addon" (rather then as a cgi-bin script) -- you'll need to 
  170.        make a very simple change to MKButton.HTM --- see MKButton.HTM
  171.        for details.
  172.  
  173. That's it.
  174.  
  175. Reminder:
  176.        if you "installed by hand"  DON"T FORGET TO DO STEP 2.b5 !
  177.  
  178. You can point your browser at MKGIFTXT.HTM or MKGIFRM.HTM
  179. (did you do step 2b.6?) and try it out: it's a nice way to 
  180. quickly create "banners" that you can use as static images. 
  181.  
  182. Or, you can include <IMG src="/GIF_TEXT?options..> elements
  183. in your HTML  documents -- a process described in the next section.
  184.  
  185. As mentioned in the introduction, GIF_TEXT can be used in stand-alone mode. 
  186.    From an OS/2 prompt,
  187.      i) CD (change directory) to the directory that you installed GIF_TEXT 
  188.     ii) enter GIF_TEXT (at the prompt)
  189.  
  190. A Caution to SRE-http users:
  191.      On some machines, the RXGD101.DLL library used by GIF_TEXT will
  192.      occassionally generate a SYS3175 error that can crash GoServe. 
  193.      If this should ocur, you may want to err on the side of caution by running
  194.      GIF_TEXT as a cgi-bin script (since errors that occur whilst executing a 
  195.      cgi-bin script will NOT crash GoServe).  However, do note that when run
  196.      as cgi-bin script, several options (such as the "send in pieces", and
  197.      "get remote .GIF files") will not be available.
  198.  
  199. -----------------------------------------------------
  200. II. Using GIF_TEXT
  201.  
  202. GIF_TEXT is often invoked using an IMG element (in an HTML document)
  203. that contains special "request line options".  Several of these options 
  204. are required (such as the text string), and several are optional 
  205. (such as background color). This section describes all the GIF_TEXT 
  206. "requestable" options.
  207.  
  208. Please be aware that default values of many of these options can be 
  209. set in GIF_TEXT.CMD, and in "font index file". However, request line 
  210. options take precedence over these defaults.
  211.  
  212. By way of introduction, the following simple examples may help:
  213.  
  214. * When using SRE-http:
  215.   <IMG src="/GIF_TEXT?text=Welcome+surfers&font=enviro&width=300&as=MESS.GIF">
  216.   <IMG src="/GIF_TEXT?text="The time is:$T"&font=andy01&time_Fmt=N&as=MESS.GIF">
  217.  
  218.    The request line options in the first example:
  219.         text=Welcome+surfers&font=enviro&width=300&as=MESS.GIF
  220.    and in the second example:
  221.         text="The time is:$T"&font=andy01&time_Fmt=N&as=MESS.GIF
  222.  
  223. * When using a CGI-BIN capable server:
  224.   <IMG src="/CGI-BIN/GIF_TEXT?text=Welcome+surfers&font=enviro&width=300&as=MESS.GIF">
  225.   <IMG src="/CGI-BIN/GIF_TEXT?text="The time is:$T"&font=andy01&time_Fmt=N&as=MESS.GIF">
  226.  
  227.   (the only difference is the inclusion of a /CGI-BIN before the /GIF_TEXT?)
  228.  
  229. * HINT: the as=MESS.GIF at the end is strictly optional: it is only included 
  230.         to "force" certain browsers to treat the returned image as a .GIF 
  231.         file. For example:
  232.                when processing in-line images, IBM's Web Explorer expects
  233.                a .GIF extension and does not pay attention to the
  234.                mime-type response header.
  235.  
  236.  
  237. * When run from an OS/2 command line, you can either run GIF_TEXT without
  238.   an options, or you can specify a set of options.  When run without
  239.   options, GIF_TEXT will ask a series of questions; such as the which
  240.   font to use, the background, color slide, and image size.  
  241.   When run with options, GIF_TEXT will not prompt you for input, it
  242.   will read them from the option list.
  243.  
  244.   The option list should be a space delimited list, with the format:
  245.     var=value  var=value
  246.   For example:
  247.     D:\GIFTEXT>gif_text message=helo font=revue back=backs/pap_gry2 as=foo.gif
  248.  
  249.   Note that you MUST include the as=filename option.
  250.  
  251.                                 ----------------
  252.  
  253. IIa. Short descripton of GIF_TEXT "request line" Options:
  254.  
  255. Required:
  256.     TEXT :  The message to be converted into a graphic.
  257.     FONT :  The alphabyte font to use.
  258.  
  259. Optional, and recommended:
  260.     WIDTH: The width, in pixels, of the image 
  261.    HEIGHT: The height, in pixels, of the image 
  262.  
  263. Optional:
  264.          AS: File to save GIF image to (command line mode only),
  265.    TIME_FMT: The format used to display the time.
  266.    DATE_FMT: The format used to display the date.
  267.    BACK    : A background image for the text
  268.  BACK_SCALE: Scale or tile the background image
  269.         X_F: Size of frame (left and right)
  270.         Y_F: Size of frame (top and bottom)
  271.        X_OF: Left/right offset 
  272.        Y_OF: Up/down offset
  273.       X_SCA: A list of "width scales"
  274.       Y_SCA: A list of "height scales"
  275.       Y_VAL: Type of vertical (character box) alignment
  276.      LINE_J: Type of horizontal (line) justification
  277.    LINE_SEP: Spacing between lines (in pixels)
  278.       SLIDE: Name of a color slide .GIF file
  279.     SLIDE_T: Threshold rules (& parameters) for color slides
  280.     SLIDE_V: Vertical mapping rule for color slides
  281.     SLIDE_H: Horizontal mapping rule for color slides
  282.     SLIDE_C: Specify "center coordinates" when using a color slide
  283.   FIGDIST_T: Method for computing color slide distances
  284.    SLIDE_SI: Size of "user specified color slide" (# pixels and # colors)
  285.    SLIDE_RE: Red color parameters for "created slide"
  286.    SLIDE_GR: Green color parameters for "created slide"
  287.    SLIDE_BL: Blue color parameters for "created slide"
  288.    SLIDE_PR: Probability parameters for "using slide value"
  289. Optional, infrequently used:
  290.   FONT_NAME: The "name" of the alphabyte font             
  291.  FONT_INDEX: The "index file" for the alphabyte font 
  292.    TTF_FONT: The TTF font to use
  293. TTF_FONT_SIZE: The size (in points) of the TTF font
  294. TRANSPARENT: The index of the transparent color 
  295.   BACKCOLOR: The background RGB colors.
  296.   TEXTCOLOR: The default-font RGB colors       
  297.     LITERAL: Supress $n code interpretation (rarely used)
  298.      MANY_C: How to choose from a set of complete fonts (multiple complete)
  299.        SEND: Select "send pieces as they become available" mode
  300.  
  301. Reminder:
  302.   As noted above,several of these options will override defaults. 
  303.   There are two kinds of defaults:
  304.            General: Set by variables contained in the user configurable 
  305.                     parameters section of GIF_TEXT.CMD.
  306. Alphabyte specific: Set in the alphabyte's FONT_INDEX file.
  307.  
  308.                                 ----------------
  309.  
  310. II.b Long description of Options:
  311.  
  312.  
  313. IIb.1 ------------ Required
  314.  
  315. TEXT: The message to be converted into a graphic.
  316.       Example: TEXT=This+is+a+message
  317.  
  318.       TEXT should contain an arbitrarily long message.  This message 
  319.       should be properly "URL encoded": spaces should be represented by
  320.       + characters, and certain special characters (such as &, ?, and ")
  321.       should be coded using the approprate encoding (i.e.; %26 for &).
  322.  
  323.       In addition to the keyboard characters, you can include special
  324.       codes. The most useful special codes are:
  325.          $t -- include the current time
  326.          $d -- include the current date.
  327.          $$ -- the code for the $ character.
  328.          $b -- filled box: a "rectangular space" filled with the textcolor
  329.          $n -- new line. Use $n special codes to create a multiple
  330.                line image. Note that CRLF's (10 and 13 hex) are stripped
  331.                from the text -- to signify a new line, you must use
  332.                $N.
  333.          $F(fontname) -- switch font to the fontname font.
  334.          $#nnn;   -- an ascii code -- nnn is a number between 000 and 255
  335.          $#nnx; -- an ascii code -- nn is a hex number between 00 and ff
  336.                   Example: This is umlaut u: $#252;
  337.                            The  $#fcx;  is  umlaut u.
  338.                   You can try these with the COURIER font (note that the ascii 
  339.                   codes "escaped" by these $#nnn; sequences matcn ##nn entries 
  340.                   in COURIER.IND).
  341.                   CAUTION: Do NOT forget to end these $#nnn with a semi-colon!
  342.       
  343.       You can also define your own "special codes".  For example,
  344.       when using the ENVIRO font, a $10 is interpreted as a left quote,
  345.       and a $11 as a right quote.
  346.  
  347.       For further details see the  "technical notes" section below.
  348.  
  349. FONT: The "alphabyte" or "complete" font to use.
  350.          Example:  FONT=revue
  351.  
  352.        Note: either FONT,or TTF_FONT (and TTF_FONT_SIZE), should 
  353.        always be specified
  354.  
  355.  
  356.        The FONT argument should point to a subdirectory (of the GIF_DIR_ROOT
  357.        directory)  This subdirectory should contain the various .GIF 
  358.        and .IND files that comprise an alphabyte, or a single .GIF file 
  359.        that contains a "complete font".
  360.  
  361.        Since most alphabytes do NOT contain .GIF files for all keyboard
  362.        characters, GIF_TEXT will perform appropriate substitutions.  
  363.        In particular:
  364.          a) upper case characters will be used if there is
  365.             no lower case character available
  366.          b) A "complete font" can be used (if one is specified in the
  367.             appropriate FONT_INDEX).
  368.          c) as a last resort, a default (and rather rudimentary) font will 
  369.             be used
  370.  
  371.        GIF_TEXT comes packaged with a number of alphabytes, including:
  372.  
  373.          Enviro: a subtly colored set of letters (upper and lower case), numbers,
  374.                  and some punctation
  375.          Revue: a  brightly colored set of letters, numbers, and some punctuation
  376.          Stich: a  brightly colored set of letters, numbers, and some punctuation
  377.          Hobo: a blocky-colorful set of letters and numbers)
  378.          Mandarin: a multicolored set of letters, numbers, and some punctuation
  379.          Logger: a woody set of letters 
  380.          andy01  a drippy set of letters and numbers, and some punctuation
  381.          andy02: a set of typewritter keys (letters only)
  382.          andy03: an  austere set of letters 
  383.  
  384.  
  385. TTF_FONT: A TTF (true type) FONT to use 
  386. TTF_FONT_SIZE: it's size (in points)
  387.  
  388.     Example:  
  389.        TTF_FONT='couri'
  390.        TTF_FONT_SIZE=30
  391.  
  392.     Note: either FONT, or TTF_FONT (and TTF_FONT_SIZE), should 
  393.           always be specified
  394.  
  395.  
  396.     The TTF_FONT should point to a TTF font file relative to the
  397.     TTF_FONT_DIR (that you set in step 5 above). For example,
  398.     if TTF_FONT_DIR='C:\OS2\FONTS', and TTF_FONT="ARIAL", then  
  399.     C:\OS2\FONTS\ARIAL.TTF file will be used.
  400.  
  401.     Colors used for TTF_FONTS will be set by the TEXTCOLOR and
  402.     BACKCOLOR options. However, by using color slides you can
  403.     greatly increase the visual appeal of the your GIF_TEXT images.
  404.  
  405.     For a variety of reasons, messages written with a TTF font 
  406.     are NOT done a "character at a time". Thus, the "character
  407.     scaling" rules will NOT apply to each character in the message.
  408.  
  409.     Notes:
  410.        *  If both a TTF font, and an "alphabyte or complete" font 
  411.           are specified, the TTF font will be used.   
  412.  
  413.        * If TTF_FONT is specified, but TTF_FONT_SIZE is not (or if 
  414.          TTF_FONT_SIZE=0), then the TTF font will NOT be used (instead,
  415.          the value of FONT will be used).. 
  416.  
  417.  
  418. II.b.2----------------- Recommended
  419.  
  420.  
  421. WIDTH: The width, in pixels, of the image.
  422.            Example: Width=480
  423.         The image will be scaled to fit into WIDTH pixels. If you do not
  424.         specify WIDTH, or if you set WIDTH=0, then GIF_TEXT will use all
  425.         the pixels required).
  426.  
  427.         Notes: * this overrides the default WIDTH variable (in GIF_TEXT.CMD)
  428.                * width will include X_FRAME (thus, writeable area is
  429.                  width-2*X_FRAME)
  430.  
  431. HEIGHT: The height, in pixels, of the image.
  432.           Example: height=60
  433.         The image will be scaled to fit into WIDTH pixels. If you do not
  434.         specify HEIGHT, or if you set WIDTH=0, then GIF_TEXT will use all
  435.         the pixels required.
  436.  
  437.          Note: * this overrides the default HEIGHT variable (in GIF_TEXT.CMD)
  438.                * height iwll include Y_FRAME (thus, writeable area is
  439.                  height-2*Y_FRAME)
  440.  
  441.  
  442.  
  443. II.b.3----------------- Often useful
  444.  
  445. AS:  The file to save the GIF image to. This is ONLY used in a parameter
  446.      list included in a command-line invocation of GIF_TEXT. 
  447.         
  448.      For example:
  449.         D:\APPS>gif_text text=hi font=hobo as=hello1.gif
  450.  
  451.         
  452.  
  453. TIME_FMT: The format used to display the time.
  454.             Example: time_Fmt='N'
  455.  
  456.           GIF_TEXT understands several "REXX" time formats. They are:
  457.              L : Long (for example: 16:54:22.12000)
  458.              N : 24 hour (16:54:22) 
  459.              H : Hour (16)
  460.              M : Minutes (1014)
  461.              S : Seconds (60682)
  462.              C : Civil (4:54pm)
  463.              1 : Same as C, with special am and pm characters used 
  464.                  (if available)
  465.  
  466.          Note: this overrides the default TIME_FMT variable (in GIF_TEXT.CMD)
  467.  
  468. DATE_FMT: The format used to display the date.
  469.             Example: time_Fmt='E'
  470.  
  471.          GIF_TEXT understands several "REXX" date formats. They are:
  472.              N: Internet standard (for example: 27 Aug 1988)
  473.              D: Days  (240)
  474.              E: European (27/08/88)
  475.              M: Month  (August)
  476.              B: Basedate (725975)
  477.              O: Ordered  (88/08/27)
  478.              S: Sorted (19880827)
  479.              U: US (08/27/88)
  480.              W: Weekday (Saturday)
  481.  
  482.  
  483.          Note: this overrides the default DATE_FMT variable (in GIF_TEXT.CMD)
  484.  
  485.  
  486.       BACK:  The name of .GIF file to use as a background for the text
  487.              message. It should be a filename relative to the GIF_DIR_ROOT
  488.              directory.
  489.                   Example: BACK="BACKS/SATIN.GIF"
  490.  
  491.                Notes:
  492.                  *  By default, no background is used
  493.                  *  BACK=0 means "no background"
  494.                  *  When BACK is set, then BACKCOLOR is ignored.
  495.  
  496.  
  497.                SPECIAL OPTION: if GIF_Text is being run as an SRE-http addon,
  498.                                then you can specify a fully-qualified URL
  499.                                pointing to a .GIF file. GIF_Text will attempt
  500.                                to retrieve this .GIF file and use it as a
  501.                                background.
  502.  
  503.  
  504.                Variant: BACK2 means the same, and will override, BACK.
  505.  
  506.  
  507.  BACK_SCALE:  If BACK_SCALE=1, then the background will be scaled to
  508.               fit into the message area.  Otherwise (by default) the
  509.               background image will be "tiled" into the message area.
  510.  
  511.  
  512.         X_F:  The size, in pixels, of the left and right frame.
  513.         or    This is designed to be used with the WIDTH option.
  514.      X_FRAME  It is most useful when combined with a background,
  515.               especially a "button" background".
  516.  
  517.               Note: the width of the text will be WIDTH-(2*X_F).
  518.               
  519.  
  520.         Y_F:  The size, in pixels, of the top and bottom frame.
  521.         or    is designed to be used with the HEIGHT option.
  522.      Y_FRAME  It is most useful when combined with a background,
  523.               especially a "button" background".
  524.  
  525.               Note: the height of the text will be HEIGHT-(2*Y_F).
  526.  
  527.       X_OF    Move the image this many pixels to the right (or left, if
  528.        or     X_OF is negative. If large values are used, portions of
  529.    X_OFFSET   the image will be cutoff (they'll be outside of the frame
  530.               of the image).
  531.  
  532.  
  533.       Y_OF    Move the image this many pixels down (or up, if
  534.        or     X_OF is negative. If large values are used, portions of
  535.    Y_OFFSET   the image will be cutoff (they'll be outside of the frame
  536.               of the image).
  537.  
  538.               Hint: you can use the X and Y offsets to create a "shadow"
  539.                     of your text image. To do this:
  540.                       a) create a .GIF image of a text string, with
  541.                          a small (say, 10) offset; and using a 
  542.                          bland color slide
  543.                       b) save this image to a file in your GIF_DIR_ROOT
  544.                          directory
  545.                       c) regenerate the image, using:
  546.                          i) the image created in b) as background file
  547.                         ii) 0 offsets 
  548.                        iii) using no, or a different, color slide
  549.  
  550.       Y_VAL:  Vertical alignment. By default, characters are aligned at
  551.          or   the top of the image (after adding a y_frame); pr at
  552.     Y_VALIGN  the top or bottom of "line's image" (of a multi-lines-of-text
  553.               image). You can choose to align at the bottom, or in the middle:
  554.  
  555.                  Y_VAL=T  -- top of image
  556.                  Y_VAL=M  -- middle of image
  557.                  Y_VAL=B  -- bottom of image
  558.  
  559.      LINE_JUST : Type of line justification. Can be L,C, or R
  560.         or       (left, right or center); with L the default.
  561.      JUSTIFY     Only used on multiple line messages (where $n
  562.                  is used to specify a "new line".
  563.  
  564.  
  565.      LINE_SEP  : Spacing between lines (of a multi-line message),
  566.                  in pixels. The default value is 2.   
  567.  
  568.  
  569. The next several options, dealing with scales and slides, are used
  570. to produce fancy transforms of your characters: including in-message
  571. variations in character size, and color transformations.
  572. The color transformations are especially handy when
  573. used with black and white fonts (such as the "complete" fonts one
  574. might derive from a ttf or ps font).
  575.  
  576.  
  577.       X_SCA:  A space delimited list of "width scale factors", used to
  578.         or    adjust the width of each character of the message.
  579.     X_SCALE   This list should contain numbers, where 1.0 means
  580.               do not adjust width, <1.0 means shrink, and >1.0 means
  581.               increase. Width adjustment works by mapping the
  582.               nth character of the message to the this list, with
  583.               fractional mappings resolved by interpolating between
  584.               list components.
  585.  
  586.               Example: X_SCA=1.0+1.2+1.5+1.1  (note use of + to signfiy space)
  587.               In this example, the first character will be regular size,
  588.               increasing until 2/3 through the message (where the 
  589.               adjustment is a 50% increase), and then decreasing to a 10%
  590.               increase at the last character
  591.  
  592.        Y_SCA: Same as X_SCA, but for character height
  593.         or    Example: Y_SCA=0.5+1.0+2.0
  594.       Y_SCALE Start at 1/2 size and end at double size.
  595.  
  596.  
  597.  
  598. Color slides are used to transform the color of each pixel in the message
  599. image. Basically, if the value of a pixel in the "message image"  
  600. exceeds some threshold, then an appropriate color in the "color slide" 
  601. is displayed (instead of the color specified in the "message image").
  602.  
  603. Execution note: Although color slides are a very convenient way of
  604. converting a simple (black and white) "complete font" into a
  605. colorful font, they do require some time to execute -- say,
  606. 20 seconds to process a 300x50 image (on a Pentium 100).
  607.  
  608.  
  609.      SLIDE  : The name of slide file.  Slide files are simply images
  610.               that are used to transform the colors of the message.
  611.               In it's simplest use:
  612.                  If the pixel value of the message image is greater then 1,  
  613.                  Then the color of the corresponding pixel, in the slide, 
  614.                  will be used.
  615.                The "corresponding pixel" is a function of pixel position, 
  616.                both horizontally and vertically -- see the SLIDE_H,
  617.                SLIDE_T, and the other SLIDE_ options for details!
  618.  
  619.               Note: When specified in the selector, relative slide files 
  620.                     should be .GIF files located relative to the 
  621.                     ALPHABYT directory. For example,
  622.                     slide=slides/rainbow.gif (might) be in the
  623.                     D:\GOSERVE\ALPHABYTE\SLIDES\RAINBOW.GIF directory.
  624.  
  625.               Note: When specified in a font index file, relative SLIDE files 
  626.                     are assumed to be relative to the font's own directory.
  627.  
  628.             example: slide=slides/rainbow2.gif
  629.                      (note that / is converted to \)
  630.  
  631.  
  632.                SPECIAL OPTION: if GIF_Text is being run as an SRE-http addon,
  633.                                then you can specify a fully-qualified URL
  634.                                pointing to a .GIF file. GIF_Text will attempt
  635.                                to retrieve this .GIF file and use it as a
  636.                                color slide.
  637.  
  638.      SLIDE_S : Size of user created color slide.  SLIDE_S (and SLIDE_B,
  639.                SLIDE_G, and SLIDE_R) are IGNORED if SLIDE is specified
  640.                (and the .GIF file that SLIDE points to exists).
  641.  
  642.      SLIDE_H : Horizontal slide type. Two types are recognized:
  643.                   T = Tile. If the image is wider then the slide, then
  644.                       repeat the slide (i.e.; horizonatally concatenate it)
  645.                   F = Fit. If the image is wider then the slide, then
  646.                       stretch the slide (i.e.; create runs).
  647.                   If the slide is wider then the image, then pick equidistant
  648.                   pixels from the slide, with the first (last) pixel in
  649.                   the slide used for the first (last) pixel of the image
  650.                   (that is, fit image to slide).
  651.  
  652.                     example:slide_h=T
  653.  
  654.                  Note: the default value is F
  655.  
  656.      SLIDE_V :  Vertical slide type. Three types are recognized:
  657.                   T = Tile
  658.                   F = Fit
  659.                   N = Just use one row (in the middle third of the image)
  660.                 If the slide is just one row high, then this option is
  661.                 ignored (the first row is always used).
  662.                 Example:
  663.                   slide_v=F
  664.  
  665.      SLIDE_T :  Slide threshold.  A two component answer: tnnn; where
  666.                   type is the type, and nnn is an integer between 0 and 255.
  667.                 Type can be P,B,C.
  668.                      P : If pixel value is >=nnn, use slide
  669.                      B : If average of the 3 color values is >= nnn, use slide
  670.                      C : If any one of the 3 color values is >=nnn, use slide
  671.                 Examples:
  672.                         slide_t=P1     (this is the default)
  673.                         slide_t=C100
  674.  
  675.           Note: for a typical black and white alphabyte,, such as a 
  676.                 "ttf derived" complete font, you should use slide_t=P1
  677.  
  678.           Special usage of SLIDE_T -- you can specify a colon delimited
  679.           list of thresholds; the threshold used will be drawn from this list,
  680.           with interpolation (i.e.; in the same way that X_SCALE is 
  681.           interpolated). For example:
  682.                 SLIDE_T=P1:2:5
  683.           means the threshold starts at 1, goes to 2 for the middle width,
  684.           and ends at 5. 
  685.           Note: it is probably NOT wise  to use this "pixel specific" threshold
  686.                  with B/W fonts.
  687.  
  688.    SLIDE_C : Coordinates to use when computing slide position.  A space 
  689.              delimited pair of numbers, each number can be a fraction between 
  690.              0 and 1 (inclusive).
  691.  
  692.              By default, the "column" (the width pixel value) in the message 
  693.              image is used when looking up a color slide value.  However, 
  694.              you can use a "pixel distance" from some user defined center.  
  695.              The effect is to create a 2d color wash, radiating out from 
  696.              this center.
  697.              Note that the SLIDE_C  coordinates are defined as a fraction 
  698.              of width and height; thus 0 0 is the uppe left corner,
  699.              1 0 is the upper right corner, and  0 1 is the lower left corner. 
  700.              
  701.              Example: SLIDE_C=0.5+0.1  (center is near the top, at the 
  702.                                        horizontal center)
  703.  
  704. FIGDIST_T :  Method of computing distances for use with color slides.
  705.              Four methods are supported:
  706.                 1 : Linear distance. dist= sqrt(dx*dx + dy*dy). 
  707.                 2 : Box-steps. dist =  abs(dx)+abs(dy)
  708.                 3 : Modified box-steps. 
  709.                       dist=  max(abs(dx),abs(dy)) + min(abs(dx),abs(dy))/2
  710.                 4 : 1 dimensional:  dist=max(abs(dx),abs(dy))
  711.              where dx and dy are the "x" and "y" offsets (from a given pixel
  712.              to a reference point).
  713.  
  714.              Method 1 tends to yields smoothest results, but can be quite slow
  715.              (especially if you do not have REXXLIB.DLL). Method 2 and
  716.              method 4 are similar, and are the fastest (about 10 times
  717.              faster then method 1). Method 3 is an approximation to
  718.              method 1, and is almost as fast as methods 2 and 4.
  719.              
  720.              We recommend method 3.  However, you might want to experiment:
  721.              in some cases, the results of using different methods can be 
  722.              quite different (this is most likely to occur when you 
  723.              specify SLIDE_C).
  724.  
  725.                 Example: FIGDIST_T=3
  726.                 
  727.    SLIDE_P:  Probability of using the color slide's value.  This should be 
  728.              a space delimited list of fractions (between 0.0 and 1.0, 
  729.              inclusive).  A value of 0 means "use the alphabyte's color",
  730.              a value of 1 means "use the color slide's color".
  731.              Example: SLIDE_P=1+1+0.9+0.2+0+0
  732.                       First third of image is color slide, last third is
  733.                       image, middle third is a mixture.
  734.                       Note that + are used as "space parameters"; when
  735.                       SLIDE_P is entered in a font index file, use spaces
  736.                       between the values.
  737.               SLIDE_P is meant to provide a simple means of creating a 
  738.               foreground fade-into effect: between the alphabyte's image and 
  739.               the color slides's image.  Creation and use of in-between colors
  740.               might look  better, but with a 256 color limit per .GIF file,
  741.               it might not.
  742.  
  743.  
  744.    SLIDE_SI: Size of "user specified color slide" (# pixels and # colors)
  745.              Instead of using a color slide contained in a file, you can
  746.              "create" your own. SLIDE_SI should equal the size (in colors,
  747.              hence in pixels) of this slide.
  748.              For example: SLIDE_SI=50  ; a 50 element color slide will be
  749.                           used (based on SLIDE_RE, SLIDE_GR, and SLIDE_BL) 
  750.              Setting SLIDE_SI=0 (the default) suppresses this option.
  751.                 
  752.    SLIDE_RE: Red color parameters for "created slide". Enter a  list of
  753.              0 to 1 fractions; with 0 meaning "none of this color", and
  754.              1 "max intensity of this color".   
  755.                 For example: SLIDE_RE=0.0+0.2+0.3+0.9+0.1
  756.              the red intensity will increase, then suddenly drop off.
  757.              Note that SLIDE_GR and SLIDE_BL are specified in the same manner.
  758.    SLIDE_GR: Green color parameters for "created slide"
  759.    SLIDE_BL: Blue color parameters for "created slide"
  760.  
  761.  
  762. Mask files are used to mask the final image (the final image contains the 
  763. background, the text characters, and the color slide modifications of the
  764. text characters.  Mask files are simply .GIF files that are interpreted 
  765. as "mask" -- with "masked" elements set to a pixel value of 0 (i.e.; to the
  766. transparent pixel).  This can be used to create some interesting effects.
  767.  
  768.   MASK_FILE:  Name of a mask file. This should be a .GIF file in (or relative
  769.               to) the GIF_DIR_ROOT directory
  770.  
  771.                SPECIAL OPTION: if GIF_Text is being run as an SRE-http addon,
  772.                                then you can specify a fully-qualified URL
  773.                                pointing to a .GIF file. GIF_Text will attempt
  774.                                to retrieve this .GIF file and use it as a
  775.                                mask file.
  776.  
  777.                Examples: MASK_FILE=circle.gif
  778.                          MASK_FILE=http://foo.bar.net/shapes/triangle.gif
  779.         
  780.  
  781.   MASK_THRESHOLD:  By default, a value of 0 is used as a threshold. Use
  782.                    MASK_THRESHOLD (set to a non-zero value) to change this.
  783.                         Example: MASK_THRESHOLD=3
  784.   MASK_REVERSE:    By default, pixels in the final image with values less than
  785.                    of equal to the MASK_THRESHOLD will be transformed to 0
  786.                    valued pixels.  You can use MASK_REVERSE to switch this
  787.                    (pixels greater then MASK_THRESHOLD will be transformed).
  788.                          Example: MAXK_SCALE=Y
  789.   MASK_SCALE:      As with color slides and backgrounds, you can either scale
  790.                    the mask file to fit the image you've created, or you
  791.                    can tile the mask file over the image.
  792.                          Example: MASK_SCALE=Y
  793.  
  794.  
  795. II.b.4 --------------- Less frequently used
  796.  
  797.   FONT_NAME: The "name" of the alphabyte font.
  798.       or         Example: FONT_NAME='ENVIRO'
  799.     NAME     The FONT_NAME is used when resolving .GIF filenames.
  800.              This parameter is NOT required when using the alphabytes
  801.              shipped with GIF_TEXT.  
  802.                      
  803.              See the "technical notes" section for details
  804.              on how and when to use FONT_NAME.
  805.  
  806.   FONT_INDEX: The "index file" for the alphabyte font.
  807.       or         Example: FONT_INDEX='ENVIRO.IND'
  808.     INDEX    The FONT_INDEX contains alphabyte explicit information, including
  809.              character to .GIF file assignations. If not included, GIF_TEXT
  810.              will look for a FONT.ind file (in the FONT sub-directory of the
  811.              GIF_DIR_ROOT directory).
  812.  
  813.              This parameter is NOT required when using the alphabytes
  814.              shipped with GIF_TEXT.  
  815.  
  816.              See the "technical notes" and "Sample of a FONT_INDEX" sections
  817.              of this document for further details on how and when to use a
  818.              FONT_INDEX.
  819.  
  820.   CACHE:     The name of a file (in the GIF_DIR_ROOT directory)
  821.              to use to store the created image.
  822.              If the "image cache" is enabled (see the technical notes),
  823.              then the image cache is first searched for this file.
  824.              If it exists (and is still valid), it will be used.
  825.              If it does not exist, the image will be saved to this
  826.              file "for future use".  See the technical notes below for details.
  827.              Note: if a $t or $d occurs in the message, CACHE is ignored!
  828.   CACHE2:    Same as CACHE, but $t and $d do NOT suppress use of the
  829.              cache (note that the time and date will NOT be updated)!
  830.  
  831.   BACKC:    The background RGB colors.
  832.    or             Example: BACKC=98AE10
  833. BACKCOLOR   A 6-hex-character color code used to define the background color.
  834.              
  835.              This will override the DEF_BACKCOLOR  variable (in GIF_TEXT.CMD)
  836.              In addition, it will override the BACK= parameter in the FONT_INDEX.
  837.              Note that if a BACKground file is used, BACKCOLOR is not used.
  838.              
  839.   TEXTC: The default-font RGB colors                                     
  840.    or           Example: TEXTCOLOR=FF220
  841. TEXTCOLOR    A 6-hex-character color code used to define the default-text color.
  842.              
  843.              This will override the DEF_TEXTCOLOR variable (in GIF_TEXT.CMD)
  844.              In addition, it will override the TEXT= parameter in the FONT_INDEX.
  845.  
  846.   TRANS: The index of the transparent color.
  847.                  Example: TRANSPARENT=0
  848.              Should be a value between 0 and 255. A value of -1 means "no
  849.              transparent color".
  850.  
  851.              This will override the DEF_TRANSPARENT variable (in GIF_TEXT.CMD)
  852.                               
  853.     LITERAL: Set to 1 to supress $n code interpretation in the text. 
  854.                 Example LITERAL=1
  855.       SEND:  Set to 1 to "send pieces of the image as they become available, 0 to 
  856.               send entire image when done.
  857.               This overrides the SEND_PIECES argument in GIF_TEXT.CMD
  858.                Note that "sending pieces" only works with browsers that can
  859.                handle multi-part documnets (such as Netscape 1.3, but not
  860.                IBM Web Explorer 1.1)
  861.  
  862.  MANY_C   : MANY_C has two uses:
  863.                 1) If equal to CYCLE FIT END or RANDOM:
  864.                       overrides the MANY_COMPLETE setting in the FONT_INDEX.
  865.                 2) If equal to a number > 0:
  866.                       sets the "number of fonts" to use.  
  867.                       This is useful if you only want to use the first
  868.                       2 (or 1, or 3, or ...) of a many-font set.
  869.             See section IV.a for details
  870.  
  871.  
  872. Note: when running GIF_TEXT in "stand alone" mode, you will be explicitly
  873.       asked to provide values for several of these options. You will also be
  874.       given the opportunity to enter "additional options" -- in which case you
  875.       should use the syntax specified above (i.e.; as if the options were
  876.       part of an http request).  Note that stand-alone mode has a bit of 
  877.       on-line help, and it will save prior answers in a GIF_TEXT.ANS file.
  878.  
  879.  
  880. -----------------------------------
  881. III. Technical notes
  882.  
  883. GIF_TEXT roughly  takes the following steps when considering a request. Note
  884. that the values of the parameters may be a generic default (as set in 
  885. GIF_TEXT.CMD), may be from the font index file, or may be supplied as one of 
  886. the request options.
  887.  
  888. 1) Determine the size of the image
  889. 2) Create a background
  890. 3) Determine locations of characters
  891.    a) Use a character specific .GIF file if avaialable
  892.    b) Use a "complete font" file if available
  893.    c) If neither a or b are satisified, use the built in font
  894.    Section IIIa describes this step in greater detail.
  895. 4) IF X_SCALE or Y_SCALE are specified, stretch (or shrink) the image
  896.     associated with each character
  897. 5) Create a message image using results from step 4
  898. 6) If a color slide is specified, transform the appropriate pixels
  899.    in the "message image". Section IIIh contains details.
  900. 7) Write the message image on top of the background
  901. 8) If a mask was specified, use the mask to set foreground pixels
  902.    to the background "color"
  903. 9) Transfer the results.
  904.  
  905.  
  906.  
  907. IIIa. Basic File Matching Algorithim
  908.  
  909. When using "alphabyte" fonts, with one font per character,
  910. GIF_TEXT has to determine what the appropriate .GIF file is.
  911.  
  912. For purposes of illustration, let's assume two examples:
  913.   i) <IMG src="/GIF_TEXT?font=HOBO&message=Welcome!">
  914.  ii) <IMG src="/GIF_TEXT?font=NEWFONTS\FONT1&message=Welcome+(today)">
  915. and a GIF_DIR_ROOT='D:\GOSERVE\ALPHABYT' (as set in GIF_TEXT.CMD).
  916.  
  917. Furthermore, assume that you've correctly installed the various .GIF and
  918. .IND files  be in the appropriate FONT= directories of the
  919. GIF_DIR_ROOT. In our examples, these directories are:
  920.   i)  D:\GOSERVE\ALPHABYT\HOBO\
  921.  ii)  D:\GOSERVE\ALPHABYT\NEWFONTS\FONT1\
  922.  
  923. The following outlines the logic used by GIF_TEXT when matching a .GIF 
  924. file to a character.
  925.  
  926. 1) A FONT_INDEX file (in this directory) will be examined for explicit
  927.    "character to .GIF file" assignations. 
  928.   
  929.      If you did not define a FONT_INDEX, then an "ownname.ind"
  930.      file is looked for. In our examples, the following index files
  931.      are looked for:
  932.          i)  D:\GOSERVE\ALPHABYT\HOBO\HOBO.IND
  933.         ii)  D:\GOSERVE\ALPHABYT\NEWFONTS\FONT1\FONT1.IND
  934.  
  935.    If the desired character is listed in the FONT_INDEX, and the file this
  936.    listing refers to exists, then this "refered to file" is used.
  937.    For example, an entry in the FONT_INDEX of:
  938.                 # NUM.GIF
  939.    means "use NUM.GIF for the # character".
  940.    Or, either
  941.                ##224 ALPHA.GIF 
  942.                ##E0x ALPHA.GIF
  943.    means "use ALPHA.GIF if the characters ascii value is 224" (note that the latter syntax
  944.    is the hex value of 224).
  945.    
  946.    Caution: If you are using MKGIFTXT.HTM -- be aware that the "ascii" value 
  947.            sent by a browser (using #hh syntax) depends on the code page used
  948.            by the browser). For "high ascii" characters, you might want to instruct
  949.            users to use $#nnn; or $#nnx; sequences.
  950.  
  951.    In addition, the FONT_INDEX can contain information on which (if any)
  952.    "complete" font to use as an "alphabyte specific default". 
  953.  
  954.    For details on how to structure a FONT_INDEX file, see the
  955.    "Sample of a FONT_INDEX" section of this document. For details on
  956.    "Complete" fonts, see the Complete Fonts section of this document.
  957.  
  958. 2) If no match in the FONT_INDEX can be found, then look for
  959.    the following file names.
  960.  
  961.     a) For lower case characters only 
  962.       a1) Look for xLC.GIF
  963.       a2) Look for FONTNAMExLC.GIF
  964.       a3) Look for FONTNAME-xLC.GIF
  965.     b) For all characters:
  966.       b1) Look for x.GIF
  967.       b2) Look for FONTNAMEx.GIF
  968.       b3) Look for FONTNAME-x.GIF
  969.       b4) Look for xFONTNAME.GIF
  970.  
  971.     .... where x is the desired character, and FONTNAME is the name of the
  972.          desired font.
  973.  
  974. 3) If 1 and 2 do not yield a match, then generate a font using either:
  975.       a) the "alphabyte specific complete" font, or
  976.       b) the the rudimentary font built into GIF_TEXT.
  977.    In either case ,the TEXTCOLOR variable can be used as the color of
  978.    the message-text.
  979.    Note that TEXTCOLOR can come from (in order of precedence):
  980.        a) A TEXTCOLOR= option (in the src="...")
  981.        b) A TEXT= entry in the FONT_INDEX file
  982.        c) The value of the DEF_TEXTCOLOR variable (in GIF_TEXT.CMD).
  983.    (see section IIId for details on "alphabyte specific complete" fonts).
  984.  
  985. Example: 
  986.     If the "x" character of the HOBO alphabyte is desired, and
  987.     there is no match in HOBO.IND, the following will be looked
  988.     for (the first successful match is used):
  989.       a)  D:\GOSERVE\ALPHABYT\HOBO\XLC.GIF
  990.       b)  D:\GOSERVE\ALPHABYT\HOBO\HOBOXLC.GIF
  991.       c)  D:\GOSERVE\ALPHABYT\HOBO\HOBO-XLC.GIF
  992.       d)  D:\GOSERVE\ALPHABYT\HOBO\X.GIF
  993.       e)  D:\GOSERVE\ALPHABYT\HOBO\HOBOX.GIF
  994.       f)  D:\GOSERVE\ALPHABYT\HOBO\HOBO-X.GIF
  995.       g)  D:\GOSERVE\ALPHABYT\HOBO\XHOBO.GIF
  996. Notes:
  997.   * for non-english alphabytes (i.e.; alphabytes containing 
  998.     umlaut, acutes, and other such characters); you might need to specify
  999.     $nn or ##nnn entries in the FONT_INDEX file.
  1000.   * for non lower case characters, steps a,b and c are skipped.
  1001.   * if you've obtained a font with a prefix that does
  1002.     not match it's "name", you should include a FONTNAME
  1003.     option.  For example, for
  1004.         <IMG src="/GIF_TEXT?font=HOBO&message=Welcome!"&FONTNAME=SLICK>
  1005.     instead of HOBO\HOBOXLC.GIF, GIF_TEXT would look for
  1006.     HOBO\SLICKXLC.GIF, etc. In addition, if INDEX is not specified,
  1007.     GIF_TEXT will look for SLICK.IND as an index file.
  1008.   *  Reminder: OS/2 does NOT differentiate between upper and lower case
  1009.      when searching for a filename.
  1010.  
  1011.                                 ----------------
  1012.  
  1013. IIIb. Adding an alphabyte
  1014.  
  1015. To add an alphabyte:
  1016.   1) Create a new subdirectory under the GIF_DIR_ROOT 
  1017.   2) Copy the .GIF files (1 per character) to this subdirectory.
  1018.   3) You might need to rename the .GIF files to adhere to the
  1019.      logic discussed in section IIIa.  In general, unless you really
  1020.      need to, it's simpler to NOT specify the FONT_INDEX and FONT_NAME
  1021.      when invoking GIF_TEXT (just make sure you've approriately named
  1022.      the alphabyte, etc. files).
  1023.   4) Create a FONT_INDEX file. The font_index file should always 
  1024.      contain the BACK= (background) and TEXT= (textcolor) arguments.
  1025.      You can also include:
  1026.       * Special "character to GIF file" mappings (such as for punctuation
  1027.         marks, or high-ascii characters).
  1028.       * Special entries (to match $nn substrings, such as $1 and $2 for the
  1029.         AM and PM "characters").  
  1030.       * An alphabyte-specific "complete font" to use as a default.
  1031.  4a) For "complete fonts" that stand by themselves
  1032.      (such as those derived from ttf or ps fonts), there will
  1033.      be NO "character specific GIF files", and the FONT_INDEX 
  1034.      file is REQUIRED!
  1035.   5) If you find renaming files to be tedious, and the names of the 
  1036.      alphabyte .GIF files do not conform to the rules discusssed above, 
  1037.      you can include "character specific filenames" in the FONT_INDEX file.
  1038.   6) You can specify special characters ($n) in the FONT_INDEX file 
  1039.      (see section IV for details).
  1040.  
  1041.                                 ----------------
  1042.     
  1043. IIIc. Adding a  background
  1044.       Adding a background is as simple as finding a .GIF file (say, a
  1045.       texture) that you like, and copying it to some directory relative
  1046.       to the GIF_DIR_ROOT directory (say; d:\goserve\alphabyt\backs).
  1047.       You might want to reduce the color table of the background (remember,
  1048.       a .GIF file can only have 256 colors), but you don't have to.
  1049.  
  1050.        Reminder:
  1051.          When specifying the background, be sure to include the subdirectory
  1052.          (relative to the GIF_DIR_ROOT dir).  
  1053.          For example: back=backs/my_back.gif
  1054.                         where backs is a subdirectory of GIF_DIR_ROOT
  1055.  
  1056.                                 ----------------
  1057.  
  1058. IIId. Adding a complete font
  1059.  
  1060.       As an alternative to the use of "one file per character" alphabytes,
  1061.       GIF_TEXT can also use "complete" fonts. By "complete" fonts, we refer
  1062.       to a .GIF file that contains a  "grid" of fonts arranged in equi-sized
  1063.       cells. 
  1064.  
  1065.       In addition to allowing one to use "regularly spaced" fonts delivered in
  1066.       one file, complete fonts can be a convenient way to make use  of
  1067.       postscript and true type fonts.
  1068.  
  1069.           Note: Various programs (GhostScript for PS fonts, THUMBSPLUS
  1070.                 for TTF fonts, etc.)  can display the various characters
  1071.                 that comprise a  (PS, TTF, etc.)font.  Typically, the
  1072.                 characters will be displayed in a "grid", with each cell of 
  1073.                 the "grid" the same size.
  1074.              
  1075.       With a little bit of work, a .GIF file containing such a "grid" can be 
  1076.       used as a "complete font".   That is, instead of looking for a file that
  1077.       matches a character, GIF_TEXT can extract the image of the character 
  1078.       from a (single) .GIF file that contains a "complete set of fonts".
  1079.  
  1080.       In order to do this, you must provide some information in a
  1081.       FONT_INDEX (an .IND) file.
  1082.         a) The name of the .GIF file that contains the complete font
  1083.         b) A "black and white" flag 
  1084.         c) the x,y offset (in pixels)  to the upper left corner of the first 
  1085.            character
  1086.         d) the number of characters in a row 
  1087.         e) the width and height of each character (in pixels)
  1088.         f) the "within grid cell" offset (left, top, right, bottom)
  1089.         g) a list of the characters, in order of appearance.
  1090.         h) Optional: text color, transparency, and background color information.
  1091.  
  1092.       In general, you would create a seperate directory for a
  1093.       "complete" font that would contain just the .GIF 
  1094.       and the .IND file (the FONT_INDEX).
  1095.  
  1096.       Perhaps of greater use, you can combine a standard (1 file per
  1097.       character) alphabyte with a complete font -- the "complete" font will 
  1098.       be used if no matching "alphabyte" file can be found.  
  1099.       To do this, just add the items mentioned above to the alphabyte's
  1100.       FONT_INDEX (the .IND file); and make sure the "complete font" .GIF
  1101.       file is in the same directory as the "single character" .GIF files 
  1102.       (of this alphabyte).
  1103.  
  1104.       Notes:
  1105.           *  For details on what to include in the .IND file, see section 
  1106.              IV below.
  1107.           *  You may find EXT_GIF.CMD, a simple utility included with 
  1108.              GIF_TEXT, useful.
  1109.              It can be  used to extract all the "character" .GIF files from a 
  1110.              complete font. This can be useful for:
  1111.                ** verifying the .IND file (say, in conjunction with PMVIEW's
  1112.                   thumbnail feature)
  1113.                ** if you want to modify each font  (say, to create a 
  1114.                   1-file-per-character alphabyte).
  1115.  
  1116.                                 ----------------
  1117. IIIe. Adding a TTF font
  1118.  
  1119.   To add a TTF font, simply copy the TTF font file to the TTF_ROOT_DIR.
  1120.   No further set up is required. Be sure to copy the TTF font, and
  1121.   not a ZIPped version of the font!
  1122.  
  1123.   Alternatively, you can create subdirectories under TTF_ROOT_DIR.
  1124.   If you adopt this approach, be sure to include the subdirectory
  1125.   name (in addition to the font file name) when specifying a
  1126.   TTF_FONT option.
  1127.  
  1128.   Lastly, when run under SRE-http, you can GET a ttf font off of the WWW --
  1129.   just specify it's URL (make SURE to include the http://).
  1130.  
  1131.                                 ----------------
  1132.  
  1133. IIIf. Caching Images
  1134.  
  1135.   When using GIF_TEXT to create static in-line images (that do not contain
  1136.   $t or $d, and that are not created by MKGIFTXT or some other FORM based
  1137.   front end), it is likely that the same image will be recreated repetitively.
  1138.   Of course, you can be sensible and create the image once (say, with 
  1139.   MKGIFTXT), save it,  and include this saved image explicitily.
  1140.   But if you are sort of lazy, and have a powerful enough machine,
  1141.   you can use the GIF_TEXT cache to "save the images for you".
  1142.  
  1143.   To do this, you have to do two things:
  1144.     1) In GIF_TEXT.CMD: Set the values of the CACHE_DURATION and CACHE_SIZE
  1145.        variables. 
  1146.         *  CACHE_DURATION sets the lifespan of a "saved image" (in
  1147.            days). If you might modify the "alphabytes", set this
  1148.            to be a low value.  
  1149.                 Example: CACHE_DURATION=2
  1150.         *  CACHE_SIZE sets the maximum number of "saved images" to retain.
  1151.            If you are worried that hackers might "save" a lot of
  1152.            images on your site, set this to a low number.  Note
  1153.            that once the CACHE_SIZE files appear in the
  1154.            GIF_DIR_ROOT directory, caching is suppressed -- there is
  1155.            no attempt to "intelligently" weed out older or less used
  1156.            entries.  
  1157.                 Example: CACHE_SIZE=150
  1158.     2) Include a CACHE=filename.GIF option in your <IMG Src="/GIF_TEXT?..">
  1159.        element.
  1160.        Alternatively, use a CACHE2=filename.GIF. CACHE2 will "force caching",
  1161.        even if a $t (time) or $d (date) "special code" appears in the message.
  1162.           Example: <IMG SRC="/GIF_TEXT?font=revue&text=Welcome!&cache=WELCOME1.GIF">
  1163.        * In this example:
  1164.            If "WELCOME1.GIF" exists, it will be used. Otherwise, GIF_TEXT will 
  1165.            generate the image, send it to the client, and thant save the image to
  1166.            WELCOME1.GIF for future use.
  1167.  
  1168.        Notes:
  1169.          * to supress caching, set CACHE_SIZE=0
  1170.          * If you do not include a CACHE= option, the cache is ignored.
  1171.          * filename.GIF should be a UNIQUE filename --
  1172.  
  1173.             !!! It is YOUR responsibility to NOT use the same
  1174.             !!! name for different in-line images.
  1175.  
  1176.          * filename should NOT contain path information -- it will
  1177.             refer to files in the GIF_DIR_ROOT directory.
  1178.  
  1179. WARNING: Since use of the cache requires invocation of GIF_TEXT, rather then
  1180.          mere transferal of a file, we don't generally recommend it -- 
  1181.          on a low-powered  server, it can be slow.
  1182.          Furthermore, there is some concern with stability --
  1183.          on occassion, when RXGDUTIL procedures are rapidly called, (as will 
  1184.          happen if a single document contains requests for several "cached"
  1185.          images) server errors may occur (such as the infamous SYS3175).
  1186.  
  1187. HINT:    One good use of the CACHE option is to save an image for 
  1188.          later downloading (a trick used by MKGIFTXT.CMD).
  1189.  
  1190. IIIg.  Using GIF_TEXT as a counter
  1191.  
  1192.   Although not the most efficient method of generating a graphical
  1193.   "hit counter", GIF_TEXT does provide a fairly powerful graphical counter.
  1194.   However, you will need a server that can generate a textual
  1195.   "count of hits"  as a "server side include". 
  1196.       For example, users of the SRE-http WWW server can use:
  1197.          i) <!-- REPLACE COUNTS --> or
  1198.         ii)  <!-- INTERPRET FILE COUNTER.RXX file=somefile.cnt&width=5 -->
  1199.  
  1200.  
  1201.    Example of a "random colors" counter, using the COUNTER.RXX facility:
  1202.  
  1203.    <img src="/cgi-bin/gif_text?font=bck&back=backs/tan&text=<!-- $ counter.rxx
  1204.      file=sample1&width=4-->&height=50&width=100&x_f=2&y_f=2"
  1205.      alt="hit counter">
  1206.  
  1207.    A more traditional example, using a frameless auto style odometer, and
  1208.    SRE-http's REPLACE COUNT:
  1209.         <img src="/cgi-bin/gif_text?font=57chevy&text=<!-- replace count -->"
  1210.             alt="<!-- replace count -->">
  1211.  
  1212.  
  1213. III.h) Using color slides.
  1214.  
  1215. Color slides are simple and effective means of making drab fonts come alive
  1216. with color.  The notion is to create a "message image" using your favorite
  1217. alphabyte (or complete font), and then use "foreground" colors drawn from 
  1218. the color slide instead of the colors the font was created with.
  1219. This is especially useful when used with black and white fonts, such
  1220. as "complete fonts" derived from a ttf or ps font.
  1221.  
  1222. At it's simplest, a color slide is a one row .GIF file with some sort 
  1223. of rainbow or similar color pattern.  For each row of the "message
  1224. image" (the image formed from writing the appropriate alphabyte 
  1225. characters), a column-by-column mapping, between the pixel in the 
  1226. message image and the pixel in the color slide, is performed. If a pixel's
  1227. value is above a threshold (i.e.; greater  then 0), then
  1228. the color from the color slide will be used.  Thus, a pixel on the left size
  1229. of the image will be displayed with a different color then a pixel (with the 
  1230. same value) on the right side of the image.
  1231.  
  1232. There are two ways of specifying a color slide:
  1233.   1) By selecting a .GIF file to use as a color slide.
  1234.      GIF_TEXT comes with a dozen or so examples of color-slide files.  
  1235.   2) By specifying a set of RGB parameters.
  1236.      The SLIDE_S (and SLIDE_R, SLIDE_G, and SLIDE_B) can be used
  1237.      to specify a color slide).
  1238.  
  1239. Once specified, there are 3 ways the color slide can be used
  1240.   1) As a single row (column specific) transformer 
  1241.   2) As a "color wash" (or color gradient) centered at a point
  1242.      defined by the SLIDE_C option.
  1243.   3) As a 2 dimensional foreground image.
  1244.  
  1245. In all cases, it is unlikely that the size (either height or width) will
  1246. be the same as the size of the message image.  To fit these mismatched sizes,
  1247. you can either repeat the color slide, or you can stretch it -- the
  1248. SLIDE_V and SLIDE_H control this fit method.
  1249.  
  1250. Note that when the color slide is used as "single row", a multi-row GIF file
  1251. can still be used, GIF_TEXT will use a row 1/3 of the way down from the top.
  1252. Please be aware that to use a multi-row color slide as a single row, you
  1253. must set SLIDE_V=N.
  1254.  
  1255. Selection of which message image pixels to transform is based on the
  1256. pixel's value, on the SLIDE_T option, and on the SLIDE_P option. Selection
  1257. is usually based on the pixel's  value, which ranges between
  1258. 0 and 255 (i.e.; in b/w images, background pixels typically have a a value
  1259. of 0, and foreground pixels have a value of 1).  However, the average color
  1260. brightness of the pixel, or it's maximum color brightness can be used.  
  1261. Furthermore, this threshold can depend on the position in the image of the 
  1262. pixel.
  1263.  
  1264. You can also use the SLIDE_P option to create a fade-into effect, with 
  1265. the color slide colors being used at the start of an image, the alphabyte 
  1266. colors used at the end, and a mixture used in between. 
  1267.  
  1268.  
  1269. III.i) Switching fonts
  1270.  
  1271. You can use the $F(fontname) "special code" to tell gif_text to start
  1272. using the "fontname" font.  This can be used to create fairly complicated
  1273. mixed-font messages (it's a more flexibile alternative to the "multiple 
  1274. variants of a font" option discussed below).  
  1275.  
  1276. Be aware that the switched-to font may have slightly "wrong" characteristics.
  1277. For example, "complete fonts" may be displayed using the color associated
  1278. with the message's "original" font.
  1279.  
  1280. Also note that the fontname must be a "standard" GIF_TEXT font. That is,
  1281. it must point to a font in a subdirectory of your alphabytes directory,
  1282. and this subdirectory should contain a fontname.ind file. For example,
  1283. if fontname is "HOBO", then the HOBO/ and HOBO/HOBO.IND, will be used.
  1284. In other words, the fontname is use for the FONT_NAME, FONT_INDEX,
  1285. and FONT_DIR variables.
  1286.  
  1287.  
  1288. Alternatively, you can switch to a TTF font. To do this, the "fontname"
  1289. should have the following structure:
  1290.    !nn_ttfname
  1291. where
  1292.    nn = point size
  1293.    ttfname = name of the ttf file (without the .TTF extension)
  1294. For example:
  1295.   message="Courier and $f(!28_couri) 28 point italic."
  1296.  
  1297.  
  1298. -----------------------------------
  1299. IV. Sample of a FONT_INDEX
  1300.  
  1301. The notion is that GIF_TEXT has defaults (declared in GIF_TEXT.CMD) 
  1302. that are overridden on a font-specific basis by entries in the font's 
  1303. "index" file
  1304.  
  1305. Note:
  1306.    You can override these font-specific defaults on a request
  1307.    specific basis by including the appropriate options in the 
  1308.    request to the server.
  1309.  
  1310.    In general, most of the "request line options" can be specified in
  1311.    a FONT_INDEX. Thus, for a complete description of what the parameters
  1312.    do, either check the descriptions in the "options" above, or look 
  1313.    at the sample below.
  1314.  
  1315. Note that several of these parameters expect a space delimited list.
  1316. In the description above (as request line options), a + is used as a space --
  1317. a requirement of the http method of forming requests. However, when
  1318. specified in an index file, you can use a space (that is, use a space
  1319. instead of a + character).
  1320.  
  1321. The following illustrates and describes FONT_INDEX files. Note that
  1322. blank lines are ignored, and that lines starting with ** are comments.
  1323.  
  1324. List of FONT_INDEX parameters:
  1325.  
  1326.   TEXT=aabbcc   : Default text color
  1327.   BACK=aabbcc   : Default background color
  1328.  
  1329.   x filename.gif : Match character "x"  to an explicit gif file
  1330.   ##nnn filename.gif : Match character with an ascii value of nnn to an explicit gif file
  1331.   ##nnx filename.gif : Match character with an ascii value of nn (hex) to an explicit gif file
  1332.  
  1333.   char=n filename.gif : Match a $n (or $nn) substring to an explicit gif file
  1334.  
  1335.   x_scale=n.n m.m j.j : Space delimited list "character specific width scales"
  1336.   y_scale=n.n m.m j.j : Space delimited list "character specific height scales"
  1337.   y_valign=T/M/B      : How to vertically align characters
  1338.   slide=filename.gif  : An (optional) color slide file.
  1339.   slide_h =T/F         : Tile or Fit color slide to image (horizontal)
  1340.   slide_v =T/N/F       : Tile, Fit, or one row of color slide to image (vertical)
  1341.   slide_t =P/C/An:n2:n3  : Threshold: (pixel, one color, or average color)
  1342.   slide_p =v1 v2 v3    : Probability of using slide parameters
  1343.   slide_s =n           : size of user specified color slide (0=none)
  1344.   slide_r =v1 v2 v3    : Red parameters for user specified color slide  
  1345.   slide_g =v1 v2 v3    : Green parameters "  "     "         "     "
  1346.   slide_b =v1 v2 v3    : Blue parameters "  "     "         "     "
  1347.  
  1348.   (the following parameters are used to describe a "complete font":
  1349.  
  1350.   complete=filename.gif : File containing a "complete "font. More then one
  1351.                           complete= may appear.
  1352.                           Note: for downward compatability, you can also use
  1353.                                 defaults=filename.gif
  1354.   def_chars=abcd e      : List of characters (must match list of characters in
  1355.                          the complete font file). When specifying a "complete" font,
  1356.                          this is REQUIRED.
  1357.   def_bw=0/1            : Complete Font is a black & white font (if so, 
  1358.                           use TEXT and BACK colors)
  1359.   def_offset=xoff yoff  : Pixel offset to top-left of first character
  1360.                          (in a complete font file)
  1361.   def_inrow             : # characters per row 
  1362.   def_charsize=width height : Character size (width and height)
  1363.   def_char_offset=l t r b   : Additional offset, within character (gets rid of
  1364.                               white space)
  1365.  
  1366.  
  1367.                     -------- Beginning of Sample .IND file -----
  1368.  
  1369. ** FONT_INDEX files are used to:
  1370. **  1) set explicit character-to-file matches, 
  1371. **  2) set the text-color and other defaults
  1372. **  3) to identify  special "characters".
  1373. **  4) information on the "alphabyte specific complete" font.
  1374.  
  1375.  
  1376. ** 1a) Text-color-defaults
  1377. **  Start the line with a TEXT=, and then immediately thereafter put in the
  1378. **  6 hex character color code
  1379. **  i.e.   6200bb  (a reddish blue)
  1380. TEXT=60f0ff
  1381. ** 1b) Background color-defaults
  1382. **     Similar to 1a, but start the line with BACK=
  1383. BACK=633332
  1384. ** 1c) A "transparent" color-index that is  used when a background is being used.  
  1385. transparent=0
  1386.  
  1387. ** 2) Character-to-file matches
  1388. **   Each entry should contain the character (case sensitive), followed by the
  1389. **   file name (relative to the font_dir directory -- do NOT use a fully
  1390. **   qualified name)
  1391. - DASH.GIF
  1392. ' APOS.GIF
  1393. ! EXC.GIF
  1394. : COLON.GIF
  1395. & AMP.GIF
  1396. ? QUEST.GIF
  1397. AM AM.GIF
  1398. PM PM.GIF
  1399. ** characters with an "ascii" value of 225 use BETA.GIF
  1400. ##225 Beta.gif
  1401. ** Same as above, but expressed in hex
  1402. ** Note: using hex, it's easier to match browser mappings, of FORM inputs, to desired characters.
  1403. ##e1x Beta.gif
  1404.  
  1405. ** Note special "AM" and "PM" entries -- these are ONLY used by
  1406. ** the $T "time of day" special character
  1407. ** Note that for characters not included in this file, the
  1408. ** default naming conventions will be used (see section III.a for details)
  1409.  
  1410. ** 3) Identifying special characters
  1411. **    GIF_TEXT interprets $n substrings (in the message),with n some digit, to mean
  1412. **    "use special character # n".  You can define these "special characters"
  1413. **    here by using 
  1414. **         CHAR=n  file.gif
  1415. **    For example, if you have a special PM character, you could define
  1416. **         CHAR=1 pm.gif
  1417. **   and if the message contains $1, then the PM.GIF "character" will be
  1418. **   inserted (if PM.GIF is not available, the $1 will be ignored)
  1419. **   Note: n must be between 0 and 99
  1420. CHAR=1 pm.gif
  1421. CHAR=2 am.gif
  1422. char=10 lquote.gif
  1423. char=11 rquote.gif
  1424. ** Note that 1 (PM.GIF) and 2 (AM.GIF) may (or may not) be different
  1425. ** then the AM.GIF and PM.GIF "character to file" matches.
  1426.  
  1427. ** 4) Information on the alphabyte-specific complete font
  1428. **  Complete fonts are .GIF files that contain all the characters.  These characters
  1429. **  must be arranged in a grid, with each cell of the grid the same size. 
  1430. **  Complete fonts are used whenever  there is is no matching "alphabyte" (.GIF) 
  1431. **   file for a character
  1432. **        (in many cases, you may not have ANY "alphabyte" files, you'll 
  1433. **         only have the  "complete" font file).
  1434. **
  1435. **  In order to use a complete font, you must specify several parameters:
  1436. **  a) The .GIF file (in the same directory as this .IND file) that contains
  1437. **     the complete font
  1438. complete=handwrit.gif
  1439. **     (note, defaults= is synonymous with complete=)
  1440. **  b) Is this a black and white font? (0=no, 1=yes).
  1441. **     If 1, then text= and back= colors are used.
  1442. **         Use 1 if you have a black and white font (say, as derived from
  1443. **         a screen dump of a .ttf font).
  1444. **     If 0, then the palette (in the .GIF file) is used as is.
  1445. **         Use 0 if you have a multi-colored "complete font"
  1446. def_bw=1
  1447. **  c) the x (column) and y (row) PIXEL offset in the .gif file  --
  1448. **     to the upper left corner of the first character (the first column of 
  1449. **     the first row of the "grid" of characters)
  1450. def_offset=0 47
  1451. **  d) the number of characters in a row (that is, the number of columns in the grid)
  1452. def_inrow=16
  1453. **  e) the width and height of each character, in pixels
  1454. def_charsize=46 47
  1455. **  f) The within-character offset.  If a lot of white space is placed around
  1456. **     each character's "grid cell", you can offset the portion used.
  1457. **     4 values are required: a left, top, right, and bottom offset.  This
  1458. **     can be used to tighten up the placement of characters in the message.
  1459. def_char_offset=0 0 0 0
  1460. **  g) The characters, in order of appearance. REQUIRED.
  1461. **     Spaces should be used for "empty or unneeded" characters
  1462. **     If this gets out of order, incorrect characters will be written!
  1463. **     A first space (after the =) is important -- since the row=1 column=1 character
  1464. **     is often (but not always) a space.
  1465. def_chars= !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
  1466. **
  1467. ** 5) Fancy modifications
  1468. **  X_SCALE (Y_SCALE) is use to shrink/expand the width (height) of each
  1469. **  character in your message. A mapping of character position to 
  1470. **  the position in the X_SCALE (Y_SCALE) list, with linear interpolation,
  1471. **  is used to determine the width (height) scale
  1472. x_scale=1 1.3 1.6 1
  1473. y_scale=1 1.1 1 0.7
  1474. **
  1475. ** Y_VALIGN is used to vertially align each characters. Y_VALIGN
  1476. ** can take 3 values: T=Top, M=Middle, and B=Bottom
  1477.  
  1478.  
  1479.  
  1480.                         -------- End of Sample .IND file -----
  1481.  
  1482.  
  1483. IV.a) Special note: using multiple variants of a font in one message.
  1484.  
  1485.   If you have variants of a "complete font" that have
  1486.   the same dimensions, but may differ in style, color, etc....
  1487.   you can use them to mix up the letters in a message.
  1488.   To do this, just specify multiple
  1489.      complete=xxx.gif
  1490.   lines.  A list of complete fonts will be formed from all the
  1491.   "complete=..." lines found.  For example, if you have:
  1492.       complete=Redwood.gif
  1493.       complete=Bluewood.gif
  1494.       complete=Grewood.gif
  1495.   then the letters will be displayed using characters from all
  1496.   three "wood" files.
  1497.   By default, the multiple "complete fonts" will be cycled through. For example,
  1498.   if the message is "hello", then
  1499.       h :  drawn from Redwood.gif
  1500.       e :  drawn from Bluewood.gif
  1501.       l :  drawn from Grewood.gif
  1502.       l :  drawn from Redwood.gif
  1503.       o :  drawn from Bluewood.gif
  1504.   You can also set
  1505.      many_complete=type
  1506.   where type can be CYCLE, FIT, or END.
  1507.      CYCLE is the default, 
  1508.      END will do a 1-to-1 match, with overflow message characters
  1509.          using the last complete font (i.e.; l,l, and o
  1510.          would all use Grewood.gif), and
  1511.      FIT would assign (approximately) equal number of character to each font;
  1512.          thus h is drawn from Redwood.gif, e and l from Bluewood.gif,
  1513.          and l and o from Grewood.gif
  1514.    RANDOM would randomly assign a character to a font (with a
  1515.           a different assignation on each request)
  1516.  
  1517.  Notes:
  1518.     *  by "same dimension", we mean the same offset, inrow, charsize, etc.
  1519.     *  The EPILOG2 "complete font", packaged with GIF_TEXT, is a simple
  1520.        example of a multiple variant font.  
  1521.     *  Instead of using these multiple variants, you might find that the
  1522.        use of $F(fontname) in a message is more flexible.
  1523.         
  1524.  
  1525. IVb. An example of adding a new alphabyte.
  1526.  
  1527.   This is a step by step example of how to add a new alphabyte. For
  1528.   illustrative purposes, let's assume that your GIF_DIR_ROOT directory
  1529.   is D:\GOSERVE\ALPHABYT (if not, just appropriately substitute the
  1530.   correct directory in what follows).
  1531.  
  1532.   1) Find the ZIPJAZ.ZIP file in the temporary directory into which
  1533.      you unzipped GIF_TEXT.ZIP. 
  1534.      NOTE: The JAZ alphabyte was obtained from Carol's Clipart, which is now
  1535.            (alas) defunct.
  1536.   2) Create a JAZ directory under D:\GOSERVE\ALPHABYT, and
  1537.      copy ZIPJAZ.ZIP  to  D:\GOSERVE\ALPHABYT\JAZ
  1538.   3) UNZIP ZIPJAZ.ZIP (in D:\GOSERVE\ALPHABYT\JAZ directory)
  1539.   4) You are now ready to produce some messages.  For example
  1540.         http://your.server.org/gif_text?text=hello&font=jaz&mess.gif
  1541.      (the final mess.gif is a hack that some browsers require to 
  1542.       succesfully display the image in-line).
  1543.   5) Now try
  1544.         http://your.server.org/gif_text?text=123abc&font=jaz&mess.gif
  1545.      This won't look so good -- we need to specify some defaults.
  1546.   6) Create a JAZ.IND  file (in the JAZ subdirectory). It should
  1547.      contain the following lines ( do NOT include stuff in parenthesis):
  1548.           BACK=b0b0b0   (a bright grey)
  1549.           TEXT=00b0b0   (a bright cyan)
  1550.           TRANSPARENT=0
  1551.     Now try http://your.server.org/gif_text?text=123abc&font=jaz&a.gif,
  1552.     it's not beautiful, but it's better.  
  1553.   7) Let's get ambitious, and add a "complete" font definition, which
  1554.      will be used as an alternate to the "generic" default.
  1555.     7a) Copy  D:\GOSERVE\ALPHABYT\BUTTRFLY\BUTTRFLY.GIF to the JAZ directory.
  1556.     7b) Add the following to JAZ.IND
  1557.           complete=buttrfly.gif
  1558.           def_offset=0 47
  1559.           def_charsize=48 47
  1560.           def_inrow=16
  1561.           def_bw=1
  1562.           def_chars= !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^ `abcdefghijklmnopqrstuvwxyz{|}
  1563.     Again,  try http://your.server.org/gif_text?text=123abc&font=jaz&a.gif,
  1564.     I'ld argue it's close to acceptable.
  1565.  
  1566.  
  1567. -----------------------------------
  1568. V. Acknowledgments
  1569.  
  1570.  
  1571. This utilty would not have been possible without the RXGD101 library
  1572. -- the full package is available from http://www.bearsoft.com/abs/rexxgd.html;
  1573.    it's a port of the GD library, and is written by  Andy Wysocki 
  1574.    (awysocki@bearsoft.com).
  1575.  
  1576. In addition, the RXTTF.DLL "ttf to bitmap" library was created by
  1577. Michal Necasek  (mike@mendelu.cz).
  1578.  
  1579. ...and, it would have been useless without the various and
  1580. sundry alphabyte fonts, etc. which were obtained from various
  1581. sources, including:
  1582.  
  1583.  
  1584. Rosie's Alphabytes
  1585.     http://www.geocities.com/HotSprings/3055/alphabet.html</a>
  1586.  
  1587. E-Mom's Rainbow Graphic Designs:
  1588.    http://members.xoom.com/e_mom/
  1589.  
  1590. Andy's Art Attack:
  1591.   http://www.andyart.com
  1592.  
  1593. Additional fonts can be found at a number of places. A very good
  1594. source for mostly free fonts, many of them "complete fonts"
  1595. (you'll need to spend a few minutes making an .IND file), can be found 
  1596. at Daniel Guildkrans site at  http://www.algonet.se/~guld1/freefont.htm
  1597.  
  1598. If you want to use GIF_TEXT as a clock or calendar, you will 
  1599. only need digits and a few special characters (such as 
  1600. the :, /, -, AM, and PM).  A good source for such limited "digit sets" 
  1601. is http://www.digitmania.com.  You can also find links to a few
  1602. other sites at http://www.digitmania.com/alphabet.html.
  1603.  
  1604. Note that several "complete-fonts" were created from true type fonts 
  1605. obtained from now defunct sources. However, you might want to try
  1606. www.customeffects.com.
  1607.  
  1608. TTF fonts can be found in many places, that tend to come and go. One
  1609. nice site (circa April 1999) is http://fonts.tedesign.net
  1610.  
  1611. Do you have questions, or do you have links to some additional alphabytes? 
  1612. Let me know:  Daniel Hellerstein (danielh@econ.ag.gov)
  1613.  
  1614.  
  1615.  
  1616.  
  1617.