Initial commit
[charfbuzz.git] / hb-shaper-private.h
blob78e3fe4e3529b39789c0763b7f8e1019b3d5a725
1 #ifndef HB_SHAPER_PRIVATE_H
2 #define HB_SHAPER_PRIVATE_H
3 //Means: succeeded, but don't need to keep any data.
4 #define HB_SHAPER_DATA_SUCCEEDED ((void*)+1)
5 //Means: tried but failed to create.
6 #define HB_SHAPER_DATA_INVALID ((void*)-1)
8 typedef hb_bool_t hb_shape_func_t(hb_shape_plan_t *shape_plan,
9 hb_font_t *font,
10 hb_buffer_t *buffer,
11 const hb_feature_t *features,
12 unsigned num_features);
13 #ifdef HAVE_GRAPHITE2
14 hb_shape_func_t hb_graphite2_shape;
15 #endif
16 #ifdef HAVE_OT
17 hb_shape_func_t hb_ot_shape;
18 #endif
19 hb_shape_func_t hb_fallback_shape;
21 struct hb_shaper_pair_t {
22 char name[16];
23 hb_shape_func_t *func;
26 //For embedding in face / font / ...
27 struct hb_shaper_data_t {
28 #ifdef HAVE_GRAPHITE2
29 void *graphite2;
30 #endif
31 #ifdef HAVE_OT
32 void *ot;
33 #endif
34 void *fallback;
37 #define HB_SHAPERS_COUNT (sizeof(struct hb_shaper_data_t)/sizeof(void *))
38 #define HB_SHAPER_DATA_IS_INVALID(data) ((void*)(data) == HB_SHAPER_DATA_INVALID)
40 struct hb_shaper_pair_t *
41 hb_shapers_get(void);
42 #endif