home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / XAP / XFIG / TRANSFIG.2 / TRANSFIG / transfig / fig2dev / dev / psfonts.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-10-14  |  1.7 KB  |  44 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. static char        *psfontnames[] = {
  25.             "Times-Roman", "Times-Roman",    /* default */
  26.             "Times-Roman",            /* roman */
  27.             "Times-Bold",            /* bold */
  28.             "Times-Italic",            /* italic */
  29.             "Helvetica",            /* sans serif */
  30.             "Courier"            /* typewriter */
  31.         };
  32.  
  33. #define PS_FONTNAMES(T)    \
  34.       (((v2_flag&&!v21_flag) || psfont_text(T)) ? PSfontnames : psfontnames)
  35.  
  36. #define PSFONT(T) \
  37.  ((T->font) <= MAXFONT(T) ? PS_FONTNAMES(T)[T->font+1] : PS_FONTNAMES(T)[0])
  38.  
  39. #define PSFONTMAG(T)    (((T->size) > 0 ? \
  40.                 ((T->size) <= ULIMIT_FONT_SIZE ? \
  41.                      (T->size) : \
  42.                     ULIMIT_FONT_SIZE) : \
  43.                 font_size)/(rigid_text(T) ? mag : 1.0))
  44.