78 unsigned int *point_count /* IN/OUT */,
79 unsigned int *point_array /* OUT */);
80
81 /* Ligature caret positions */
82 HB_EXTERN unsigned int
83 hb_ot_layout_get_ligature_carets (hb_font_t *font,
84 hb_direction_t direction,
85 hb_codepoint_t glyph,
86 unsigned int start_offset,
87 unsigned int *caret_count /* IN/OUT */,
88 hb_position_t *caret_array /* OUT */);
89
90
91 /*
92 * GSUB/GPOS feature query and enumeration interface
93 */
94
95 #define HB_OT_LAYOUT_NO_SCRIPT_INDEX 0xFFFFu
96 #define HB_OT_LAYOUT_NO_FEATURE_INDEX 0xFFFFu
97 #define HB_OT_LAYOUT_DEFAULT_LANGUAGE_INDEX 0xFFFFu
98
99 HB_EXTERN unsigned int
100 hb_ot_layout_table_get_script_tags (hb_face_t *face,
101 hb_tag_t table_tag,
102 unsigned int start_offset,
103 unsigned int *script_count /* IN/OUT */,
104 hb_tag_t *script_tags /* OUT */);
105
106 HB_EXTERN hb_bool_t
107 hb_ot_layout_table_find_script (hb_face_t *face,
108 hb_tag_t table_tag,
109 hb_tag_t script_tag,
110 unsigned int *script_index);
111
112 /* Like find_script, but takes zero-terminated array of scripts to test */
113 HB_EXTERN hb_bool_t
114 hb_ot_layout_table_choose_script (hb_face_t *face,
115 hb_tag_t table_tag,
116 const hb_tag_t *script_tags,
117 unsigned int *script_index,
218 const hb_codepoint_t *input,
219 unsigned int input_length,
220 const hb_codepoint_t *after,
221 unsigned int after_length,
222 } hb_ot_layout_glyph_sequence_t;
223
224 typedef hb_bool_t
225 (*hb_ot_layout_glyph_sequence_func_t) (hb_font_t *font,
226 hb_tag_t table_tag,
227 unsigned int lookup_index,
228 const hb_ot_layout_glyph_sequence_t *sequence,
229 void *user_data);
230
231 HB_EXTERN void
232 Xhb_ot_layout_lookup_enumerate_sequences (hb_face_t *face,
233 hb_tag_t table_tag,
234 unsigned int lookup_index,
235 hb_ot_layout_glyph_sequence_func_t callback,
236 void *user_data);
237 #endif
238
239
240 /*
241 * GSUB
242 */
243
244 HB_EXTERN hb_bool_t
245 hb_ot_layout_has_substitution (hb_face_t *face);
246
247 HB_EXTERN hb_bool_t
248 hb_ot_layout_lookup_would_substitute (hb_face_t *face,
249 unsigned int lookup_index,
250 const hb_codepoint_t *glyphs,
251 unsigned int glyphs_length,
252 hb_bool_t zero_context);
253
254 HB_EXTERN void
255 hb_ot_layout_lookup_substitute_closure (hb_face_t *face,
256 unsigned int lookup_index,
257 hb_set_t *glyphs
|
78 unsigned int *point_count /* IN/OUT */,
79 unsigned int *point_array /* OUT */);
80
81 /* Ligature caret positions */
82 HB_EXTERN unsigned int
83 hb_ot_layout_get_ligature_carets (hb_font_t *font,
84 hb_direction_t direction,
85 hb_codepoint_t glyph,
86 unsigned int start_offset,
87 unsigned int *caret_count /* IN/OUT */,
88 hb_position_t *caret_array /* OUT */);
89
90
91 /*
92 * GSUB/GPOS feature query and enumeration interface
93 */
94
95 #define HB_OT_LAYOUT_NO_SCRIPT_INDEX 0xFFFFu
96 #define HB_OT_LAYOUT_NO_FEATURE_INDEX 0xFFFFu
97 #define HB_OT_LAYOUT_DEFAULT_LANGUAGE_INDEX 0xFFFFu
98 #define HB_OT_LAYOUT_NO_VARIATIONS_INDEX 0xFFFFFFFFu
99
100 HB_EXTERN unsigned int
101 hb_ot_layout_table_get_script_tags (hb_face_t *face,
102 hb_tag_t table_tag,
103 unsigned int start_offset,
104 unsigned int *script_count /* IN/OUT */,
105 hb_tag_t *script_tags /* OUT */);
106
107 HB_EXTERN hb_bool_t
108 hb_ot_layout_table_find_script (hb_face_t *face,
109 hb_tag_t table_tag,
110 hb_tag_t script_tag,
111 unsigned int *script_index);
112
113 /* Like find_script, but takes zero-terminated array of scripts to test */
114 HB_EXTERN hb_bool_t
115 hb_ot_layout_table_choose_script (hb_face_t *face,
116 hb_tag_t table_tag,
117 const hb_tag_t *script_tags,
118 unsigned int *script_index,
219 const hb_codepoint_t *input,
220 unsigned int input_length,
221 const hb_codepoint_t *after,
222 unsigned int after_length,
223 } hb_ot_layout_glyph_sequence_t;
224
225 typedef hb_bool_t
226 (*hb_ot_layout_glyph_sequence_func_t) (hb_font_t *font,
227 hb_tag_t table_tag,
228 unsigned int lookup_index,
229 const hb_ot_layout_glyph_sequence_t *sequence,
230 void *user_data);
231
232 HB_EXTERN void
233 Xhb_ot_layout_lookup_enumerate_sequences (hb_face_t *face,
234 hb_tag_t table_tag,
235 unsigned int lookup_index,
236 hb_ot_layout_glyph_sequence_func_t callback,
237 void *user_data);
238 #endif
239
240 /* Variations support */
241
242 HB_EXTERN hb_bool_t
243 hb_ot_layout_table_find_feature_variations (hb_face_t *face,
244 hb_tag_t table_tag,
245 const int *coords,
246 unsigned int num_coords,
247 unsigned int *variations_index /* out */);
248
249 HB_EXTERN unsigned int
250 hb_ot_layout_feature_with_variations_get_lookups (hb_face_t *face,
251 hb_tag_t table_tag,
252 unsigned int feature_index,
253 unsigned int variations_index,
254 unsigned int start_offset,
255 unsigned int *lookup_count /* IN/OUT */,
256 unsigned int *lookup_indexes /* OUT */);
257
258
259 /*
260 * GSUB
261 */
262
263 HB_EXTERN hb_bool_t
264 hb_ot_layout_has_substitution (hb_face_t *face);
265
266 HB_EXTERN hb_bool_t
267 hb_ot_layout_lookup_would_substitute (hb_face_t *face,
268 unsigned int lookup_index,
269 const hb_codepoint_t *glyphs,
270 unsigned int glyphs_length,
271 hb_bool_t zero_context);
272
273 HB_EXTERN void
274 hb_ot_layout_lookup_substitute_closure (hb_face_t *face,
275 unsigned int lookup_index,
276 hb_set_t *glyphs
|