1 /*
2  * TransFig: Facility for Translating Fig code
3  * Copyright (c) 1991 by Micah Beck
4  * Parts Copyright (c) 1985-1988 by Supoj Sutanthavibul
5  * Parts Copyright (c) 1989-2002 by Brian V. Smith
6  *
7  * Any party obtaining a copy of these files is granted, free of charge, a
8  * full and unrestricted irrevocable, world-wide, paid up, royalty-free,
9  * nonexclusive right and license to deal in this software and
10  * documentation files (the "Software"), including without limitation the
11  * rights to use, copy, modify, merge, publish and/or distribute copies of
12  * the Software, and to permit persons who receive copies from any such
13  * party to do so, with the only requirement being that this copyright
14  * notice remain intact.
15  *
16  */
17 
18 static char		*psfontnames[] = {
19 			"Times-Roman", "Times-Roman",	/* default */
20 			"Times-Roman",			/* roman */
21 			"Times-Bold",			/* bold */
22 			"Times-Italic",			/* italic */
23 			"Helvetica",			/* sans serif */
24 			"Courier"			/* typewriter */
25 		};
26 
27 extern int v2_flag, v21_flag, v30_flag;
28 
29 #define PS_FONTNAMES(T)	\
30   	(((v2_flag&&!(v21_flag||v30_flag)) || \
31 		psfont_text(T)) ? PSfontnames : psfontnames)
32 
33 #define PSFONT(T) \
34  ((T->font) <= MAXFONT(T) ? PS_FONTNAMES(T)[T->font+1] : PS_FONTNAMES(T)[0])
35 
36 #define PSFONTMAG(T)  (((T->size) <= ULIMIT_FONT_SIZE ? \
37 				     T->size :  ULIMIT_FONT_SIZE) \
38 				       * ppi/(correct_font_size? (metric ? 72*80/76.2 : 72): 80))
39