     Font Library help file
%FTBBOX
  SUBROUTINE FTBBOX(IHAND,IXMIN,IYMIN,IXMAX,IYMAX)

Purpose: gets the font bounding box (maximum size of a character)

Parameters:

  IHAND   - INTEGER handle of the font to investigate

  IXMIN - INTEGER returned minimum X in OS units
 
  IYMIN - INTEGER returned minimum Y in OS units

  IXMAX - INTEGER returned maximum X in OS units
 
  IYMAX - INTEGER returned maximum Y in OS units

Error: unknown font handle, all results returned zero

Comments:

%FTCACH
  SUBROUTINE FTCACH(ISIZE,IUSED)

Purpose: gets the font cache size and amout used

Parameters:

  ISIZE - INTEGER returned size of the font cache (bytes)

  IUSED - INTEGER returned how much of the font cache is used (bytes)

Comments:

%FTFCRT
  SUBROUTINE FTFCRT(IHAND,STRING,IXIN,JUST,IXOUT,NPC,INDX)

Purpose: finds where the caret would be in a string

Parameters:

  IHAND - INTEGER handle of the font to use

 STRING - CHARACTER string to contain the caret

   IXIN - INTEGER displacement of the caret from the beginning of the
                  string (OS units)

   JUST - INTEGER length of the string if right justified or
                  0 if not right justified

  IXOUT - INTEGER returned true displacement of the caret (OS units)

    NPC - INTEGER returned number of characters to the caret

   INDX - INTEGER returned index of the caret into the character array

Comments: INDX may be different from NPC if there are control characters
          in the string

%FTFIND
  SUBROUTINE FTFIND(NAME,IHIGH,IWIDE,IHAND)

Purpose: finds a font in the font store

Parameters:

   NAME - CHARACTER name of the font to be found (must be the full name)

  IHIGH - INTEGER height of the font (OS units)

  IWIDE - INTEGER width of the font (OS units)

  IHAND - INTEGER returned font handle

Errors: font not found returns IHAND=0

%FTGETC
  SUBROUTINE FTGETC(IHAND,IBKGD,IFGND,IOFF)

Purpose: gets the colours used by a font

Parameters:

  IHAND - INTEGER handle of the font to investigate

  IBKGD - INTEGER returned background logical colour of font

  IFGND - INTEGER returned first foreground logical colour of font

   IOFF - INTEGER returned foreground colour offset (see comments)

Errors: illegal font (returns all values zero)

Comments: The foreground colour offset is the number of logical colours
          offset to the last one used. This means that |IOFF|+2
          colours are used in the anti-aliasing, the background,
          the foreground, and |IOFF| more shades to the most intense.
          |IOFF| is limited to 14.

%FTGETP
  SUBROUTINE FTGETP(IHAND,IBKGD,IFGND,IOFF)

Purpose: sets up colour palette

Parameters:

  IHAND - INTEGER handle of the font to receive the palette

  IBKGD - INTEGER array (3) to receive the red, green & blue components
                  of the background colour (values in the range 0 to 255)

  IFGND - INTEGER array (3) to receive the red, green & blue components
                  of the first foreground colour
                  (values in the range 0 to 255)

   IOFF - INTEGER returned maximum foreground colour offset (0 to 14)

Errors: illegal font handle (nothing happens)

Comments: 1)Use FTSETP to set up the font from logical colour numbers.
          2)Use FTSETP to set up the font from colour palette.
          2)The foreground colour offset is the number of logical colours
          offset to the last (most intense) one used. This means that
          IOFF+2 colours are used in the anti-aliasing, the background, 
          the foreground, and IOFF more shades. IOFF is limited to 14.

%FTGETT
  SUBROUTINE FTGETT(ITHRSH)

Purpose: gets the anti-alias thresholds used in the current font

Parameters:

 ITHRSH - INTEGER array of 16 words to receive the threshhold table

Comments: Fonts are anti-aliased using 16 possible shades. These are mapped
          on to the allowed number of colours using the |offset|+1 entries
          in the table giving thresholds.

%FTLIST
  SUBROUTINE FTLIST(NAME)

Purpose: finds the names of the available fonts

Parameters:

   NAME - CHARACTER variable to receive the latest name

Comments: the names are returned, one for each call to FTLIST until
          there are none left when a blank name is returned.

%FTLOSE
  SUBROUTINE FTLOSE(IHAND)

Purpose: drops a font from current useage

Parameters:

  IHAND - INTEGER handle of font to drop

%FTPREF
  SUBROUTINE FTPREF(IHAND,PREFIX)

Purpose: finds directory prefix for the font

Parameters:

  IHAND - INTEGER handle of font for the prefix

 PREFIX - CHARACTER string to receive the prefix

Errors: illegal font handle (returns blank)

Comments: the prefix is the whole directory structure supporting the 
          IntMetrics file of the font

%FTPRNT
  SUBROUTINE FTPRNT(IHAND,STRING,IX,IY,BLANK,JUST)

Purpose: prints a string on the screen in an anti-aliased font

Parameters:

  IHAND - INTEGER handle of the font for printing

 STRING - CHARACTER string to print

  IX,IY - INTEGERs position to start the text (bottom-left in OS units)

  BLANK - LOGICAL .TRUE.:  blank out the area for plotting first
                  .FALSE.: overwrite what was  there before

   JUST - INTEGER length (OS units) for justified text or
                  0 for plotting to natural length

Errors: illegal font handle (nothing happens)

Comments: 1) You must set up a font handle before calling this with FTFIND
          2) Call FTLOSE when you have finished with a font

%FTPRTA
  SUBROUTINE FTPRTA(IHAND,STRING,IX,IY,BLANK,ANGLE,RMAG)

Purpose: prints a string on the screen in an anti-aliased font at any angle
         and magnification

Parameters:

  IHAND - INTEGER handle of the font for printing

 STRING - CHARACTER string to print

  IX,IY - INTEGERs position to start the text (bottom-left in OS units)

  BLANK - LOGICAL .TRUE.:  blank out the area for plotting first
                  .FALSE.: overwrite what was  there before

  ANGLE - REAL*4 angle to the x-axis in radians

  RMAG  - REAL*4 magnification

Errors: illegal font handle (nothing happens)

Comments: 1) You must set up a font handle before calling this with FTFIND
          2) Call FTLOSE when you have finished with a font

%FTRFMX
  SUBROUTINE FTRFMX(MAX,MAX15)

Purpose: finds the maximum size of the font cache and FontMax1 to 5

Parameters:

    MAX - INTEGER returned value of the maximum cache size (FontMax)

  MAX15 - INTEGER array (5) to receive the values of FontMax1 to FontMax5

Errors: none

Comments: These values are configured originally at startup but may be 
          changed with FTWMAX

%FTSCRT
  SUBROUTINE FTSCRT(IHAND,ICOLOR,IX,IY)

Purpose: sets up the caret

Parameters:

  IHAND - INTEGER handle of the font wchich defines the size of the caret

 ICOLOR - INTEGER colour number exclusive ORed to the screen

  IX,IY - INTEGER position on the screen for the caret

Errors: illegal font handle (nothing happens)

Comments: Use FTFCRT to find the x coordinate of where to put the
          caret. IY is the same value used for FTPRNT

%FTSETC
  SUBROUTINE FTSETC(IHAND,IBKGD,IFGND,IOFF)

Purpose: sets up logical colours for a font

Parameters:

  IHAND - INTEGER handle of the font to receive the colours

  IBKGD - INTEGER background logical colour of font

  IFGND - INTEGER foreground logical colour of font

   IOFF - INTEGER foreground colour offset (see comments)

Errors: illegal font handle (nothing happens)

Comments: The foreground colour offset is the number of logical colours
          offset to the last one used. This means that |IOFF|+2
          colours are used in the anti-aliasing, the background,
          the foreground, and |IOFF| more shades to the most intense.
          |IOFF| is limited to 14.
          Use FTSETP to set up a colour range by RGB.

%FTSETP
  SUBROUTINE FTSETP(IHAND,IBKGD,IFGND,IOFF)

Purpose: sets up colour palette

Parameters:

  IHAND - INTEGER handle of the font to receive the palette

  IBKGD - INTEGER array (3) containing the red, green & blue components
                  of the background colour (values in the range 0 to 255)

  IFGND - INTEGER array (3) containing the red, green & blue components
                  of the first foreground colour
                 (values in the range 0 to 255)

   IOFF - INTEGER maximum foreground colour offset (0 to 14)

Errors: illegal font handle (nothing happens)

Comments: 1)the nearest colour available to the values given in IBKGD and
          IFGND will be taken.
          2)Use FTGETP to find the font from colour palette.
          3)The foreground colour offset is the number of logical colours
          offset to the last (most intense) one used. This means that
          IOFF+2 colours are used in the anti-aliasing, the background, 
          the foreground, and IOFF more shades. IOFF is limited to 14.

%FTSETT
  SUBROUTINE FTSETT(ITHRSH)

Purpose: sets the anti-aliased thresholds

Parameters:

 ITHRSH - INTEGER array of 16 words containing the threshhold table

Comments: 1) Fonts are anti-aliased using 16 possible shades. These are
          mapped on to the allowed number of colours using the |offset|+1
          entries you supply here in the threshhold table.
          2) the threshold table is independent of the font being used.

%FTSIZC
  SUBROUTINE FTSIZC(IHAND,ICHAR,IXMIN,IYMIN,IXMAX,IYMAX)

Purpose: gets a character's size

Parameters:

  IHAND - INTEGER handle of the font for which the size is desired

  ICHAR - CHARACTER*1 (or ASCII INTEGER) character for which the size is
                      desired

  IXMIN - INTEGER returned minimum X in OS units
 
  IYMIN - INTEGER returned minimum Y in OS units

  IXMAX - INTEGER returned maximum X in OS units
 
  IYMAX - INTEGER returned maximum Y in OS units
 
Errors: illegal font handle, all coordinates returned zero

Comment: The coordinates are relative to the point at which the 
         character would be plotted; e.g. IYMIN can be less than zero
         if the character has a descender.

%FTSZXY
  SUBROUTINE FTSZXY(IHAND,STRING,IXMIN,IYMIN,IXMAX,IYMAX)

Purpose: gets bounding box of a string of a string

Parameters:

  IHAND - INTEGER handle of the font for which the size is desired

 STRING - CHARACTER string to find the length of

  IXMIN - INTEGER returned minimum X in OS units
 
  IYMIN - INTEGER returned minimum Y in OS units

  IXMAX - INTEGER returned maximum X in OS units
 
  IYMAX - INTEGER returned maximum Y in OS units
 
Errors: illegal font handle, all values returned zero
                                                     
Comment: These returned coordinates are relative to the point you give to
         FTPRNT

%FTWFMX
  SUBROUTINE FTWFMX(MAX,MAX15)

Purpose: to change the size of the font cache and FontMax1 to 5

    MAX - INTEGER value of the maximum cache size (FontMax)

  MAX15 - INTEGER array (5) of the values of FontMax1 to FontMax5

Comments: These values are configured originally at startup. Use FTRMAX to
          find the current settings and then change only the ones you want.
