Upgrade to latest harfbuzz
[framework/uifw/harfbuzz.git] / src / hb-ot-layout-private.hh
1 /*
2  * Copyright © 2007,2008,2009  Red Hat, Inc.
3  *
4  *  This is part of HarfBuzz, a text shaping library.
5  *
6  * Permission is hereby granted, without written agreement and without
7  * license or royalty fees, to use, copy, modify, and distribute this
8  * software and its documentation for any purpose, provided that the
9  * above copyright notice and the following two paragraphs appear in
10  * all copies of this software.
11  *
12  * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
13  * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
14  * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
15  * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
16  * DAMAGE.
17  *
18  * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
19  * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
20  * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
21  * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
22  * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
23  *
24  * Red Hat Author(s): Behdad Esfahbod
25  */
26
27 #ifndef HB_OT_LAYOUT_PRIVATE_HH
28 #define HB_OT_LAYOUT_PRIVATE_HH
29
30 #include "hb-private.hh"
31
32 #include "hb-ot-layout.h"
33
34 #include "hb-font-private.hh"
35 #include "hb-buffer-private.hh"
36 #include "hb-ot-shape-complex-private.hh"
37
38
39
40 /*
41  * GDEF
42  */
43
44 /* XXX cleanup */
45 typedef enum {
46   HB_OT_LAYOUT_GLYPH_CLASS_UNCLASSIFIED = 0x0001,
47   HB_OT_LAYOUT_GLYPH_CLASS_BASE_GLYPH   = 0x0002,
48   HB_OT_LAYOUT_GLYPH_CLASS_LIGATURE     = 0x0004,
49   HB_OT_LAYOUT_GLYPH_CLASS_MARK         = 0x0008,
50   HB_OT_LAYOUT_GLYPH_CLASS_COMPONENT    = 0x0010
51 } hb_ot_layout_glyph_class_t;
52
53
54 HB_INTERNAL unsigned int
55 _hb_ot_layout_get_glyph_property (hb_face_t       *face,
56                                   hb_glyph_info_t *info);
57
58 HB_INTERNAL hb_bool_t
59 _hb_ot_layout_check_glyph_property (hb_face_t    *face,
60                                     hb_glyph_info_t *ginfo,
61                                     unsigned int  lookup_props,
62                                     unsigned int *property_out);
63
64 HB_INTERNAL hb_bool_t
65 _hb_ot_layout_skip_mark (hb_face_t    *face,
66                          hb_glyph_info_t *ginfo,
67                          unsigned int  lookup_props,
68                          unsigned int *property_out);
69
70
71
72 /*
73  * hb_ot_layout_t
74  */
75
76 struct hb_ot_layout_t
77 {
78   hb_blob_t *gdef_blob;
79   hb_blob_t *gsub_blob;
80   hb_blob_t *gpos_blob;
81
82   const struct GDEF *gdef;
83   const struct GSUB *gsub;
84   const struct GPOS *gpos;
85 };
86
87
88 HB_INTERNAL hb_ot_layout_t *
89 _hb_ot_layout_create (hb_face_t *face);
90
91 HB_INTERNAL void
92 _hb_ot_layout_destroy (hb_ot_layout_t *layout);
93
94
95
96 #endif /* HB_OT_LAYOUT_PRIVATE_HH */