home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / XAP / XFIG / TRANSFIG.2 / TRANSFIG / transfig / fig2dev / dev / picfonts.h < prev    next >
Encoding:
Text File  |  1992-10-14  |  1.6 KB  |  43 lines

  1. /*
  2.  * TransFig: Facility for Translating Fig code
  3.  * Copyright (c) 1985 Supoj Sutantavibul
  4.  * Copyright (c) 1991 Micah Beck
  5.  *
  6.  * Permission to use, copy, modify, distribute, and sell this software and its
  7.  * documentation for any purpose is hereby granted without fee, provided that
  8.  * the above copyright notice appear in all copies and that both that
  9.  * copyright notice and this permission notice appear in supporting
  10.  * documentation. The authors make no representations about the suitability 
  11.  * of this software for any purpose.  It is provided "as is" without express 
  12.  * or implied warranty.
  13.  *
  14.  * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  15.  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  16.  * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  17.  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  18.  * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  19.  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  20.  * PERFORMANCE OF THIS SOFTWARE.
  21.  *
  22.  */
  23.  
  24. /*  The selection of font names may be site dependent */
  25.  
  26. char        *picfontnames[] = {
  27.             "R", "R",        /* default */
  28.             "R",            /* roman */
  29.             "B",            /* bold */
  30.             "I",            /* italic */
  31.             "H",            /* sans serif */
  32.             "C"            /* typewriter */
  33.         };
  34. #define MAXFONTSIZE 108
  35.  
  36. #define PICFONT(F)    (picfontnames[((F) <= MAX_FONT) ? (F)+1 : MAX_FONT])
  37. #define PICFONTSIZE(S)  ((S) > 0 ? \
  38.                 ((S) <= MAXFONTSIZE ? \
  39.                     round(S) : \
  40.                     MAXFONTSIZE) : \
  41.                 font_size)
  42. #define PICFONTMAG(T)    PICFONTSIZE((int)(T->size*(rigid_text(T) ? 1.0 : mag)))
  43.