10 June 1999.  Michal Necasek  (mike@mendelu.cz)
                Daniel Hellerstein (danielh@econ.ag.gov)

       TTF_text: Create text-banners from TTF fonts.

TTF_text is a free, OS/2 REXX program that will create text banners 
(using printable characters).

What's special about TTF_text is that the pattern for the banner
characters is specified using a TTF font name, and point size,
provided by the user.  Thus, any TTF font you obtain can 
be used as the font for a banner, and the banner can
be just about any size.

1) Installing TTF_text.

  a) After obtaining TTF_text, unzip it to an empty temporary directory.
  b) Copy RXTTF.DLL to someplace in your LIBPATH (say, x:\OS2\DLL).
  c) You can copy TTF_TEXT.CMD to your favorite directory.
  d) To assist in demonstrating TTF_text, you can also copy BISQUE.TTF 
     to this directory.


2) Configuring TTF_text
  
   TTF_text does NOT require additional configuration; but you might want to 
   set a few parameters. These are in the ttf_text.cmd file (it's a REXX 
   program) which you can edit with your favorite text editor (for example,
   the EPM editor that ships with OS/2).

   The parameters are well explained in the file. The more important ones are:

  Use_filler_message: instead of a single foreground character, you can use
                      a "message" as the foreground character(s)

  Filler_message: the message to use (if user_filler_message is enabled)

  Default_ttfdir: the default "ttf-fonts root directory". TTF_text will look
                  for ttf fonts here, as well as in the current directory

  Outfile: default output file (only used in "prompted" mode). Or, set this
          to blank to output to stdout (the screen).

 

3) Using TTF_text

You can run it just by entering TTF_TEXT at an OS/2 prompt.
You will then prompted for the ttf font-file, the point size, 
the message, and whether to use landscape or portrait orientation.
The banner will then be written to the "outfile", or to the screen.

Alternatively, you can provide values on the command line, using the
syntax:
   ttf_text  ttf_file psize landscape message
where:
  ttf_file : the BISQUE.TTF file (a .TTF extension is added, if necessary)
   psize  :  the point size
 landscape : portrait orientation. Use 1 for landscape orientation.
   message : the text to convert into a banner

For example:
  D:\APPS>ttf_text bisque 12 0 Hello

Since "command line mode" always writes to stdout, one useful trick is to 
redirect the output to a file (using "> file.out"). For example:
  D:\APPS>ttf_text d:\fonts\times.ttfe 26 1 Happy Birthday! > bday.lst



4) Notes

 * Caution: 
      if you get wierd characters ($,[, etc.) in your prompts, it means
      you don't have ANSI support installed. See the description of 
      the use_ansi parameter (in TTF_TEXT.CMD) for the details.
 * TTF_text is based on the RxTTF library. 
   Those interested in using this procedure should look for RXTTF
   on hobbes.nmsu.edu.
 * TTF_text is in the public domain. Use it at your own risk.
 * The "bisque" font, included as an example, is freeware from:
       http://members.xoom.com/acidfonts/t.htm
 * The "outfile" is appended to -- which makes it easy to to
   create rows of big-text characters (by running ttf_text several
   times in a row)
 * In contrast, redirected output (using > file.ext) will overwrite 
   a preexisting file.


5) Known bugs
 * Some ttf fonts don't work
 * At some point sizes, and for some fonts, characters might overlap
 * Occassionally the last several columnns will be clipped; adding a space
   at the end of the message usually cures that.
 * "own character substitution" (with use_filler_message=3) requires at
   least one empty column between characters. For some fonts, especially
   large italics, this may not occur

6) Future modifications

  None planned, but who knows (I added the "own character" option in June 1999)? 
  If someone wants to write a PM interface, the code is in the public domain (look for
  RXTTF.ZIP, on hobbes.nmsu.edu, for details on the rxttf_image procedure).

 
