home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / pascal / spx10.zip / SPX_DOC.ZIP / SPX_TXT.DOC < prev    next >
Text File  |  1993-05-05  |  2KB  |  63 lines

  1. { SPX Library Version 1.0  Copyright 1993 Scott D. Ramsay }
  2.  
  3.   SPX_TXT is the raster font handling unit.  It also allows you to
  4. display your own fonts.  Has a built in small text font. (Font used in
  5. GUI- of vspmaker and geomaker.)
  6.  
  7. ───────────────────────────────────────────────────────────────────────────
  8. function stlen(s:string):word;
  9.  
  10.    Returns the width of the string in pixels based on the current font.
  11.  
  12.    S: String to check
  13.  
  14. ───────────────────────────────────────────────────────────────────────────
  15. procedure putletter(x,y:integer;c:byte;s:string);
  16.  
  17.    Display a string on the active page.
  18.  
  19.    X,Y: Top-left position to place text;
  20.    C:   Color of text;
  21.    S:   String to display
  22.  
  23.    NOTE: IF (X) is negative then the text is centered on the screen
  24.  
  25. ───────────────────────────────────────────────────────────────────────────
  26. procedure putchar(x,y:integer;h:char;c:byte);
  27.  
  28.    Display a character on the active page.
  29.  
  30.    X,Y: Top-left position to place character;
  31.    H:   Character to display;
  32.    C:   Color of character
  33.  
  34. ───────────────────────────────────────────────────────────────────────────
  35. procedure loadchb(fn:string;var cdata);
  36.  
  37.    Load a .CHB character font from disk.
  38.  
  39.    FN:     DOS file name of .CHB font file;
  40.    CDATA:  Character list to store the loaded font
  41.  
  42. ───────────────────────────────────────────────────────────────────────────
  43. procedure setchb(var buff);
  44.  
  45.   Sets the current loaded font.
  46.  
  47.   BUFF:  Buffer location of the new font
  48.  
  49.   EXAMPLE:
  50.  
  51.     var
  52.       myfont : CharList;
  53.               .
  54.               .
  55.               .
  56.  
  57.       Loadchb('myfont.chb',myfont);
  58.       setchb(myfont);
  59.  
  60.       putletter(0,0,15,'This is my font');
  61.  
  62. ───────────────────────────────────────────────────────────────────────────
  63.