ft-hb-decls.h (5350B)
1 /* 2 * Copyright © 2009, 2023 Red Hat, Inc. 3 * Copyright © 2015 Google, Inc. 4 * 5 * Permission is hereby granted, without written agreement and without 6 * license or royalty fees, to use, copy, modify, and distribute this 7 * software and its documentation for any purpose, provided that the 8 * above copyright notice and the following two paragraphs appear in 9 * all copies of this software. 10 * 11 * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR 12 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES 13 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN 14 * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 15 * DAMAGE. 16 * 17 * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, 18 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 19 * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS 20 * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO 21 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 22 * 23 * Red Hat Author(s): Behdad Esfahbod, Matthias Clasen 24 * Google Author(s): Behdad Esfahbod 25 */ 26 27 28 /* All HarfBuzz function declarations used by FreeType, taken */ 29 /* from various public HarfBuzz header files. The wrapper macro */ 30 /* `HB_EXTERN` is defined in `ft-hb.h`. */ 31 32 33 /* hb-blob.h */ 34 35 HB_EXTERN(hb_blob_t *, 36 hb_blob_create,(const char *data, 37 unsigned int length, 38 hb_memory_mode_t mode, 39 void *user_data, 40 hb_destroy_func_t destroy)) 41 42 HB_EXTERN(void, 43 hb_blob_destroy,(hb_blob_t *blob)) 44 45 46 /* hb-buffer.h */ 47 48 HB_EXTERN(void, 49 hb_buffer_add_utf8,(hb_buffer_t *buffer, 50 const char *text, 51 int text_length, 52 unsigned int item_offset, 53 int item_length)) 54 55 HB_EXTERN(void, 56 hb_buffer_clear_contents,(hb_buffer_t *buffer)) 57 58 HB_EXTERN(hb_buffer_t *, 59 hb_buffer_create,(void)) 60 61 HB_EXTERN(void, 62 hb_buffer_destroy,(hb_buffer_t *buffer)) 63 64 HB_EXTERN(hb_glyph_info_t *, 65 hb_buffer_get_glyph_infos,(hb_buffer_t *buffer, 66 unsigned int *length)) 67 68 HB_EXTERN(hb_glyph_position_t *, 69 hb_buffer_get_glyph_positions,(hb_buffer_t *buffer, 70 unsigned int *length)) 71 72 HB_EXTERN(unsigned int, 73 hb_buffer_get_length,(const hb_buffer_t *buffer)) 74 75 HB_EXTERN(void, 76 hb_buffer_guess_segment_properties,(hb_buffer_t *buffer)) 77 78 79 /* hb-face.h */ 80 81 HB_EXTERN(hb_face_t *, 82 hb_face_create,(hb_blob_t *blob, 83 unsigned int index)) 84 85 HB_EXTERN(hb_face_t *, 86 hb_face_create_for_tables,(hb_reference_table_func_t reference_table_func, 87 void *user_data, 88 hb_destroy_func_t destroy)) 89 90 HB_EXTERN(void, 91 hb_face_destroy,(hb_face_t *face)) 92 93 HB_EXTERN(void, 94 hb_face_set_index,(hb_face_t *face, 95 unsigned int index)) 96 97 HB_EXTERN(void, 98 hb_face_set_upem,(hb_face_t *face, 99 unsigned int upem)) 100 101 102 /* hb-font.h */ 103 104 HB_EXTERN(hb_font_t *, 105 hb_font_create,(hb_face_t *face)) 106 107 HB_EXTERN(void, 108 hb_font_destroy,(hb_font_t *font)) 109 110 HB_EXTERN(hb_face_t *, 111 hb_font_get_face,(hb_font_t *font)) 112 113 HB_EXTERN(void, 114 hb_font_set_scale,(hb_font_t *font, 115 int x_scale, 116 int y_scale)) 117 118 119 /* hb-ot-layout.h */ 120 121 HB_EXTERN(void, 122 hb_ot_layout_collect_lookups,(hb_face_t *face, 123 hb_tag_t table_tag, 124 const hb_tag_t *scripts, 125 const hb_tag_t *languages, 126 const hb_tag_t *features, 127 hb_set_t *lookup_indexes /* OUT */)) 128 129 HB_EXTERN(void, 130 hb_ot_layout_lookup_collect_glyphs,(hb_face_t *face, 131 hb_tag_t table_tag, 132 unsigned int lookup_index, 133 hb_set_t *glyphs_before, /* OUT. May be NULL */ 134 hb_set_t *glyphs_input, /* OUT. May be NULL */ 135 hb_set_t *glyphs_after, /* OUT. May be NULL */ 136 hb_set_t *glyphs_output /* OUT. May be NULL */)) 137 138 HB_EXTERN(hb_bool_t, 139 hb_ot_layout_lookup_would_substitute,(hb_face_t *face, 140 unsigned int lookup_index, 141 const hb_codepoint_t *glyphs, 142 unsigned int glyphs_length, 143 hb_bool_t zero_context)) 144 145 HB_EXTERN(void, 146 hb_ot_tags_from_script_and_language,(hb_script_t script, 147 hb_language_t language, 148 unsigned int *script_count /* IN/OUT */, 149 hb_tag_t *script_tags /* OUT */, 150 unsigned int *language_count /* IN/OUT */, 151 hb_tag_t *language_tags /* OUT */)) 152 153 154 /* hb-set.h */ 155 156 HB_EXTERN(void, 157 hb_set_add,(hb_set_t *set, 158 hb_codepoint_t codepoint)) 159 160 HB_EXTERN(void, 161 hb_set_clear,(hb_set_t *set)) 162 163 HB_EXTERN(hb_set_t *, 164 hb_set_create,(void)) 165 166 HB_EXTERN(void, 167 hb_set_destroy,(hb_set_t *set)) 168 169 HB_EXTERN(void, 170 hb_set_del,(hb_set_t *set, 171 hb_codepoint_t codepoint)) 172 173 HB_EXTERN(hb_bool_t, 174 hb_set_has,(const hb_set_t *set, 175 hb_codepoint_t codepoint)) 176 177 HB_EXTERN(hb_bool_t, 178 hb_set_is_empty,(const hb_set_t *set)) 179 180 HB_EXTERN(hb_bool_t, 181 hb_set_next,(const hb_set_t *set, 182 hb_codepoint_t *codepoint)) 183 184 HB_EXTERN(void, 185 hb_set_subtract,(hb_set_t *set, 186 const hb_set_t *other)) 187 188 189 /* hb-shape.h */ 190 191 HB_EXTERN(void, 192 hb_shape,(hb_font_t *font, 193 hb_buffer_t *buffer, 194 const hb_feature_t *features, 195 unsigned int num_features)) 196 197 HB_EXTERN(hb_bool_t, 198 hb_version_atleast,(unsigned int major, 199 unsigned int minor, 200 unsigned int micro)) 201 202 203 /* END */