1 /* gtkpsfont - PostScript Fonts handling
2  * Copyright 1999-2001  Adrian E. Feiguin <feiguin@ifir.edu.ar>
3  *
4  * Some code borrowed from
5  * DiaCanvas -- a technical canvas widget
6  * Copyright (C) 1999 Arjan Molenaar
7  * Dia -- an diagram creation/manipulation program
8  * Copyright (C) 1998 Alexander Larsson
9  *
10  * and Xfig
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Library General Public
14  * License as published by the Free Software Foundation; either
15  * version 2 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
20  * Library General Public License for more details.
21  *
22  * You should have received a copy of the GNU Library General Public
23  * License along with this library; if not, write to the
24  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
25  * Boston, MA 02111-1307, USA.
26  */
27 
28 
29 #ifndef __GTK_PS_FONT_H__
30 #define __GTK_PS_FONT_H__
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif /* __cplusplus */
35 
36 
37 /* List of names of the 35 default Adobe fonts
38    "Times-Roman",
39    "Times-Italic",
40    "Times-Bold",
41    "Times-BoldItalic",
42    "AvantGarde-Book",
43    "AvantGarde-BookOblique",
44    "AvantGarde-Demi",
45    "AvantGarde-DemiOblique",
46    "Bookman-Light",
47    "Bookman-LightItalic",
48    "Bookman-Demi",
49    "Bookman-DemiItalic",
50    "Courier",
51    "Courier-Oblique",
52    "Courier-Bold",
53    "Courier-BoldOblique",
54    "Helvetica",
55    "Helvetica-Oblique",
56    "Helvetica-Bold",
57    "Helvetica-BoldOblique",
58    "Helvetica-Narrow",
59    "Helvetica-Narrow-Oblique",
60    "Helvetica-Narrow-Bold",
61    "Helvetica-Narrow-BoldOblique",
62    "NewCenturySchoolbook-Roman",
63    "NewCenturySchoolbook-Italic",
64    "NewCenturySchoolbook-Bold",
65    "NewCenturySchoolbook-BoldItalic",
66    "Palatino-Roman",
67    "Palatino-Italic",
68    "Palatino-Bold",
69    "Palatino-BoldItalic",
70    "Symbol",
71    "ZapfChancery-MediumItalic",
72    "ZapfDingbats",
73 */
74 
75 typedef struct _GtkPSFont GtkPSFont;
76 
77 /**
78  * GtkPSFont:
79  *
80  * The GtkPSFont struct contains only private data.
81  * It should only be accessed through the functions described below.
82  */
83 struct _GtkPSFont {
84   /*< private >*/
85   gchar *fontname;
86   gchar *psname;
87   gchar *family;
88   gchar *pango_description;
89   gchar *i18n_latinfamily;
90   gboolean italic;
91   gboolean bold;
92   gboolean vertical;
93 };
94 
95 gint		gtk_psfont_init			(void);
96 void		gtk_psfont_unref		(void);
97 GtkPSFont* 	gtk_psfont_get_by_name 		(const gchar *name);
98 GtkPSFont* 	gtk_psfont_get_by_family        (const gchar *family_name,
99                                                  gboolean italic,
100                                                  gboolean bold);
101 PangoFontDescription*	gtk_psfont_get_font_description (GtkPSFont *font,
102 						         gint height);
103 const gchar *	gtk_psfont_get_psfontname	(GtkPSFont *psfont);
104 void		gtk_psfont_add_font		(const char *fontname,
105 						 const gchar *psname,
106 						 const gchar *family,
107 						 const gchar *pango_description,
108 						 gboolean italic,
109                                                  gboolean bold);
110 void		gtk_psfont_add_i18n_font	(const char *fontname,
111 						 const gchar *psname,
112 						 const gchar *family,
113 						 const gchar *i18n_latinfamily,
114 						 const gchar *pango_description,
115 						 gboolean italic,
116                                                  gboolean bold,
117 						 gboolean vertical);
118 void 		gtk_psfont_get_families		(GList **families, gint *num_families);
119 
120 
121 #ifdef __cplusplus
122 }
123 #endif /* __cplusplus */
124 
125 #endif /* __GTK_PS_FONT_H__ */
126