1 
2 //          Copyright Ahmet Sait Koçak 2020.
3 // Distributed under the Boost Software License, Version 1.0.
4 //    (See accompanying file LICENSE_1_0.txt or copy at
5 //          https://www.boost.org/LICENSE_1_0.txt)
6 
7 module bindbc.hb.bind.ot.deprecated_;
8 
9 version(HB_with_deprecated):
10 
11 import bindbc.hb.bind.common;
12 import bindbc.hb.bind.face;
13 import bindbc.hb.bind.ot.math;
14 import bindbc.hb.bind.ot.name;
15 
16 extern(C) @nogc nothrow:
17 
18 /* https://github.com/harfbuzz/harfbuzz/issues/1734 */
19 enum HB_MATH_GLYPH_PART_FLAG_EXTENDER = HB_OT_MATH_GLYPH_PART_FLAG_EXTENDER;
20 
21 /* Like hb_ot_layout_table_find_script, but takes zero-terminated array of scripts to test */
22 version(BindHB_Static)
23     hb_bool_t hb_ot_layout_table_choose_script (
24         hb_face_t* face,
25         hb_tag_t table_tag,
26         const(hb_tag_t)* script_tags,
27         uint* script_index,
28         hb_tag_t* chosen_script);
29 else
30 {
31     private alias fp_hb_ot_layout_table_choose_script = hb_bool_t function (
32         hb_face_t* face,
33         hb_tag_t table_tag,
34         const(hb_tag_t)* script_tags,
35         uint* script_index,
36         hb_tag_t* chosen_script);
37     __gshared fp_hb_ot_layout_table_choose_script hb_ot_layout_table_choose_script;
38 }
39 
40 version(BindHB_Static)
41     hb_bool_t hb_ot_layout_script_find_language (
42         hb_face_t* face,
43         hb_tag_t table_tag,
44         uint script_index,
45         hb_tag_t language_tag,
46         uint* language_index);
47 else
48 {
49     private alias fp_hb_ot_layout_script_find_language = hb_bool_t function (
50         hb_face_t* face,
51         hb_tag_t table_tag,
52         uint script_index,
53         hb_tag_t language_tag,
54         uint* language_index);
55     __gshared fp_hb_ot_layout_script_find_language hb_ot_layout_script_find_language;
56 }
57 
58 version(BindHB_Static)
59     void hb_ot_tags_from_script (
60         hb_script_t script,
61         hb_tag_t* script_tag_1,
62         hb_tag_t* script_tag_2);
63 else
64 {
65     private alias fp_hb_ot_tags_from_script = void function (
66         hb_script_t script,
67         hb_tag_t* script_tag_1,
68         hb_tag_t* script_tag_2);
69     __gshared fp_hb_ot_tags_from_script hb_ot_tags_from_script;
70 }
71 
72 version(BindHB_Static)
73     hb_tag_t hb_ot_tag_from_language (hb_language_t language);
74 else
75 {
76     private alias fp_hb_ot_tag_from_language = hb_tag_t function (hb_language_t language);
77     __gshared fp_hb_ot_tag_from_language hb_ot_tag_from_language;
78 }
79 
80 /**
81  * HB_OT_VAR_NO_AXIS_INDEX:
82  *
83  * Since: 1.4.2
84  * Deprecated: 2.2.0
85  */
86 enum HB_OT_VAR_NO_AXIS_INDEX = 0xFFFFFFFFu;
87 
88 /**
89  * hb_ot_var_axis_t:
90  *
91  * Since: 1.4.2
92  * Deprecated: 2.2.0
93  */
94 struct hb_ot_var_axis_t
95 {
96     hb_tag_t tag;
97     hb_ot_name_id_t name_id;
98     float min_value;
99     float default_value;
100     float max_value;
101 }
102 
103 /* IN/OUT */
104 /* OUT */
105 version(BindHB_Static)
106     uint hb_ot_var_get_axes (
107         hb_face_t* face,
108         uint start_offset,
109         uint* axes_count,
110         hb_ot_var_axis_t* axes_array);
111 else
112 {
113     private alias fp_hb_ot_var_get_axes = uint function (
114         hb_face_t* face,
115         uint start_offset,
116         uint* axes_count,
117         hb_ot_var_axis_t* axes_array);
118     __gshared fp_hb_ot_var_get_axes hb_ot_var_get_axes;
119 }
120 
121 version(BindHB_Static)
122     hb_bool_t hb_ot_var_find_axis (
123         hb_face_t* face,
124         hb_tag_t axis_tag,
125         uint* axis_index,
126         hb_ot_var_axis_t* axis_info);
127 else
128 {
129     private alias fp_hb_ot_var_find_axis = hb_bool_t function (
130         hb_face_t* face,
131         hb_tag_t axis_tag,
132         uint* axis_index,
133         hb_ot_var_axis_t* axis_info);
134     __gshared fp_hb_ot_var_find_axis hb_ot_var_find_axis;
135 }