]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/pangofc-afm-decoder.hh
cde2830b0bf71d269cc530a42c6625e0657b8080
[lilypond.git] / lily / include / pangofc-afm-decoder.hh
1 /*
2   pangofc-afm-decoder.h -- 
3
4   source file of the GNU LilyPond music typesetter
5
6   Copyright (C) 2004  Jan Nieuwenhuizen <janneke@gnu.org>
7
8   Note: in C and with explicit LPGL header for easier use with PANGO
9   outside of LilyPond.
10
11   This library is free software; you can redistribute it and/or
12   modify it under the terms of the GNU Lesser General Public
13   License as published by the Free Software Foundation; either
14   version 2.1 of the License, or (at your option) any later version.
15  
16   This library is distributed in the hope that it will be useful,
17   but WITHOUT ANY WARRANTY; without even the implied warranty of
18   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19   Lesser General Public License for more details.
20  
21   You should have received a copy of the GNU Lesser General Public
22   License along with this library; if not, write to the Free Software
23   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 */
25
26 #ifndef __PANGOFC_AFM_DECODER_H__
27 #define __PANGOFC_AFM_DECODER_H__
28
29 #include "config.h"
30 #if HAVE_PANGO_FC_FONT_MAP_ADD_DECODER_FIND_FUNC
31
32 /* Note: in C and with explicit header for use outside of LilyPond.  */
33
34 #include <pango/pangofc-fontmap.h>
35
36 G_BEGIN_DECLS
37
38 #define PANGO_TYPE_FC_AFM_DECODER              (pango_fc_afm_decoder_get_type ())
39 #define PANGO_FC_AFM_DECODER(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FC_AFM_DECODER, PangoFcAfmDecoder))
40 #define PANGO_IS_FC_AFM_DECODER(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FC_AFM_DECODER))
41
42 #define PANGO_FC_AFM_DECODER_CLASS(clss)      (G_TYPE_CHECK_CLASS_CAST ((clss), PANGO_TYPE_FC_AFM_DECODER, PangoFcAfmDecoderClass))
43 #define PANGO_IS_FC_AFM_DECODER_CLASS(clss)   (G_TYPE_CHECK_CLASS_TYPE ((clss), PANGO_TYPE_FC_AFM_DECODER))
44 #define PANGO_FC_AFM_DECODER_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_TYPE_FC_AFM_DECODER, PangoFcAfmDecoderClass))
45
46 typedef struct _PangoFcAfmDecoder        PangoFcAfmDecoder;
47 typedef struct _PangoFcAfmDecoderClass   PangoFcAfmDecoderClass;
48 typedef struct _PangoFcAfmDecoderPrivate PangoFcAfmDecoderPrivate;
49
50
51 /**
52  * PangoFcAfmDecoder:
53  * 
54  * #PangoFcAfmDecoder implements an PangoFcDecoder for fonts
55  * with an afm mapping.
56  **/
57 struct _PangoFcAfmDecoder
58 {
59   PangoFcDecoder parent_instance;
60
61   /*< private >*/
62   PangoFcAfmDecoderPrivate *priv;
63 };
64
65 PangoFcAfmDecoder *pango_fc_afm_decoder_new (void);
66 PangoFcDecoder *pango_fc_afm_find_decoder (FcPattern *pattern, gpointer user_data);
67 void pango_fc_afm_add_decoder (char const *family_name);
68
69 /**
70  * PangoFcAfmDecoderClass:
71  * @read_afm: Read afm mapping for #fcfont.
72  *
73  * Class structure for #PangoFcAfmDecoder.
74  **/
75 struct _PangoFcAfmDecoderClass
76 {
77   /*< private >*/
78   PangoFcDecoderClass parent_class;
79
80   /*< public >*/
81   void (*read_afm) (PangoFcAfmDecoder *self, PangoFcFont *fcfont);
82 };
83
84 G_END_DECLS
85
86 #endif /* HAVE_PANGO_FC_FONT_MAP_ADD_DECODER_FIND_FUNC */
87
88 #endif /* __PANGOFC_AFM_DECODER_H__ */