1 /*
2  * FIG : Facility for Interactive Generation of figures
3  * Copyright (c) 1989-2007 by Brian V. Smith
4  *
5  * Any party obtaining a copy of these files is granted, free of charge, a
6  * full and unrestricted irrevocable, world-wide, paid up, royalty-free,
7  * nonexclusive right and license to deal in this software and documentation
8  * files (the "Software"), including without limitation the rights to use,
9  * copy, modify, merge, publish, distribute, sublicense and/or sell copies of
10  * the Software, and to permit persons who receive copies from any such
11  * party to do so, with the only requirement being that the above copyright
12  * and this permission notice remain intact.
13  *
14  */
15 
16 
17 
18 #ifndef U_FONTS_H
19 #define U_FONTS_H
20 
21 #define DEF_FONTSIZE		12		/* default font size in pts */
22 #define DEF_PS_FONT		0
23 #define DEF_LATEX_FONT		0
24 #define PS_FONTPANE_WD		290
25 #define LATEX_FONTPANE_WD	112
26 #define PS_FONTPANE_HT		20
27 #define LATEX_FONTPANE_HT	20
28 #define NUM_FONTS		35
29 #define NUM_LATEX_FONTS		6
30 /* font number for the "nil" font (when user wants tiny text) */
31 #define NILL_FONT NUM_FONTS
32 
33 /* element of linked list for each font
34    The head of list is for the different font NAMES,
35    and the elements of this list are for each different
36    point size of that font */
37 
38 struct xfont {
39     int		    size;	/* size in points */
40     Font	    fid;	/* X font id */
41     char	   *fname;	/* actual name of X font found */
42     char	   *bname;	/* name of backup X font to try if first doesn't exist */
43     XFontStruct	   *fstruct;	/* X font structure */
44     XFontSet       fset;	/* X font set - used in international mode*/
45     struct xfont   *next;	/* next in the list */
46 };
47 
48 struct _fstruct {
49     char	   *name;	/* Postscript font name */
50     int		    xfontnum;	/* template for locating X fonts */
51 };
52 
53 struct _xfstruct {
54     char	   *template;	/* template for locating X fonts */
55     struct xfont   *xfontlist;	/* linked list of X fonts for different point
56 				 * sizes */
57 };
58 
59 extern int		psfontnum(char *font);
60 extern int		latexfontnum(char *font);
61 
62 extern struct _xfstruct	x_fontinfo[], x_backup_fontinfo[];
63 extern struct _fstruct	ps_fontinfo[];
64 extern struct _fstruct	latex_fontinfo[];
65 
66 int		x_fontnum(int psflag, int fnum);
67 #endif /* U_FONTS_H */
68