Upload tizen 2.0 beta source
[external/pango1.0.git] / pango / pango-ot-private.h
1 /* Pango
2  * pango-ot-private.h: Implementation details for Pango OpenType code
3  *
4  * Copyright (C) 2000 Red Hat Software
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public
17  * License along with this library; if not, write to the
18  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  */
21
22 #ifndef __PANGO_OT_PRIVATE_H__
23 #define __PANGO_OT_PRIVATE_H__
24
25 #include <glib-object.h>
26
27 #include <pango/pango-ot.h>
28 #include "opentype/hb-ot.h"
29 #include "opentype/hb-glib.h"
30
31 G_BEGIN_DECLS
32
33 typedef struct _PangoOTInfoClass PangoOTInfoClass;
34
35 struct _PangoOTInfo
36 {
37   GObject parent_instance;
38
39   guint loaded;
40
41   FT_Face face;
42
43   hb_face_t *hb_face;
44 };
45
46 struct _PangoOTInfoClass
47 {
48   GObjectClass parent_class;
49 };
50
51
52 typedef struct _PangoOTRule PangoOTRule;
53
54 struct _PangoOTRule
55 {
56   gulong property_bit;
57   guint  feature_index;
58   guint  table_type : 1;
59 };
60
61 typedef struct _PangoOTRulesetClass PangoOTRulesetClass;
62
63 struct _PangoOTRuleset
64 {
65   GObject parent_instance;
66
67   GArray *rules;
68   PangoOTInfo *info;
69
70   /* the index into these arrays is a PangoOTTableType */
71   guint n_features[2];
72   guint script_index[2];
73   guint language_index[2];
74 };
75
76 struct _PangoOTRulesetClass
77 {
78   GObjectClass parent_class;
79 };
80
81 struct _PangoOTBuffer
82 {
83   hb_buffer_t *buffer;
84   gboolean should_free_hb_buffer;
85   PangoFcFont *font;
86   guint rtl : 1;
87   guint zero_width_marks : 1;
88   guint applied_gpos : 1;
89 };
90
91 hb_face_t *_pango_ot_info_get_hb_face (PangoOTInfo *info);
92 void _pango_ot_info_substitute  (const PangoOTInfo    *info,
93                                  const PangoOTRuleset *ruleset,
94                                  PangoOTBuffer        *buffer);
95 void _pango_ot_info_position    (const PangoOTInfo    *info,
96                                  const PangoOTRuleset *ruleset,
97                                  PangoOTBuffer        *buffer);
98
99 G_END_DECLS
100
101 #endif /* __PANGO_OT_PRIVATE_H__ */