add explicit freetype2 linking
[charfbuzz.git] / hb-font-private.h
blobdce2474d44b59f5349528718422dd9af7975cf52
1 #ifndef HB_FONT_PRIVATE
2 #define HB_FONT_PRIVATE
3 struct hb_font_funcs_t {
4 atomic_int32_t ref_cnt;
5 hb_bool_t immutable;
7 /*Don't access these directly. Call hb_font_get_*() instead. */
8 struct {
9 hb_font_get_glyph_func_t glyph;
10 hb_font_get_glyph_h_advance_func_t glyph_h_advance;
11 hb_font_get_glyph_v_advance_func_t glyph_v_advance;
12 hb_font_get_glyph_h_origin_func_t glyph_h_origin;
13 hb_font_get_glyph_v_origin_func_t glyph_v_origin;
14 hb_font_get_glyph_h_kerning_func_t glyph_h_kerning;
15 hb_font_get_glyph_v_kerning_func_t glyph_v_kerning;
16 hb_font_get_glyph_extents_func_t glyph_extents;
17 hb_font_get_glyph_contour_point_func_t glyph_contour_point;
18 hb_font_get_glyph_name_func_t glyph_name;
19 hb_font_get_glyph_from_name_func_t glyph_from_name;
20 } get;
22 struct {
23 void *glyph;
24 void *glyph_h_advance;
25 void *glyph_v_advance;
26 void *glyph_h_origin;
27 void *glyph_v_origin;
28 void *glyph_h_kerning;
29 void *glyph_v_kerning;
30 void *glyph_extents;
31 void *glyph_contour_point;
32 void *glyph_name;
33 void *glyph_from_name;
34 } user_data;
36 struct {
37 hb_destroy_func_t glyph;
38 hb_destroy_func_t glyph_h_advance;
39 hb_destroy_func_t glyph_v_advance;
40 hb_destroy_func_t glyph_h_origin;
41 hb_destroy_func_t glyph_v_origin;
42 hb_destroy_func_t glyph_h_kerning;
43 hb_destroy_func_t glyph_v_kerning;
44 hb_destroy_func_t glyph_extents;
45 hb_destroy_func_t glyph_contour_point;
46 hb_destroy_func_t glyph_name;
47 hb_destroy_func_t glyph_from_name;
48 } destroy;
51 struct hb_font_t {
52 atomic_int32_t ref_cnt;
53 hb_bool_t immutable;
54 hb_font_t *parent;
55 hb_face_t *face;
56 int x_scale;
57 int y_scale;
58 unsigned int x_ppem;
59 unsigned int y_ppem;
60 hb_font_funcs_t *klass;
61 void *user_data;
62 hb_destroy_func_t destroy;
63 struct hb_shaper_data_t shaper_data;
66 void hb_font_get_glyph_advance_for_direction(hb_font_t * font,
67 hb_codepoint_t glyph,
68 hb_direction_t direction,
69 hb_position_t * x,
70 hb_position_t * y);
71 void hb_font_subtract_glyph_origin_for_direction(hb_font_t * font,
72 hb_codepoint_t glyph,
73 hb_direction_t direction,
74 hb_position_t * x,
75 hb_position_t * y);
77 #ifdef HAVE_GRAPHITE2
78 struct hb_graphite2_shaper_font_data_t;
79 struct hb_graphite2_shaper_font_data_t
80 *hb_graphite2_shaper_font_data_create(hb_font_t * font);
81 void hb_graphite2_shaper_font_data_destroy(struct
82 hb_graphite2_shaper_font_data_t
83 *data);
84 #endif
85 #ifdef HAVE_OT
86 struct hb_ot_shaper_font_data_t;
87 struct hb_ot_shaper_font_data_t *hb_ot_shaper_font_data_create(hb_font_t *
88 font);
89 void hb_ot_shaper_font_data_destroy(struct hb_ot_shaper_font_data_t *data);
90 #endif
91 struct hb_fallback_shaper_font_data_t;
92 struct hb_fallback_shaper_font_data_t
93 *hb_fallback_shaper_font_data_create(hb_font_t * font);
94 void hb_fallback_shaper_font_data_destroy(struct hb_fallback_shaper_font_data_t
95 *data);
96 #endif