2 * Copyright © 2009 Red Hat, Inc.
4 * This is part of HarfBuzz, a text shaping library.
6 * Permission is hereby granted, without written agreement and without
7 * license or royalty fees, to use, copy, modify, and distribute this
8 * software and its documentation for any purpose, provided that the
9 * above copyright notice and the following two paragraphs appear in
10 * all copies of this software.
12 * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
13 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
14 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
15 * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
18 * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
19 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
20 * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
21 * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
22 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
24 * Red Hat Author(s): Behdad Esfahbod
27 #if !defined(HB_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR)
28 #error "Include <hb.h> instead."
34 #include "hb-common.h"
42 HB_EXTERN unsigned int
43 hb_face_count (hb_blob_t *blob);
53 * Data type for holding font faces.
56 typedef struct hb_face_t hb_face_t;
59 hb_face_create (hb_blob_t *blob,
63 * hb_reference_table_func_t:
64 * @face: an #hb_face_t to reference table for
65 * @tag: the tag of the table to reference
66 * @user_data: User data pointer passed by the caller
68 * Callback function for hb_face_create_for_tables().
70 * Return value: (transfer full): A pointer to the @tag table within @face
75 typedef hb_blob_t * (*hb_reference_table_func_t) (hb_face_t *face, hb_tag_t tag, void *user_data);
77 /* calls destroy() when not needing user_data anymore */
79 hb_face_create_for_tables (hb_reference_table_func_t reference_table_func,
81 hb_destroy_func_t destroy);
84 hb_face_get_empty (void);
87 hb_face_reference (hb_face_t *face);
90 hb_face_destroy (hb_face_t *face);
93 hb_face_set_user_data (hb_face_t *face,
94 hb_user_data_key_t *key,
96 hb_destroy_func_t destroy,
100 hb_face_get_user_data (const hb_face_t *face,
101 hb_user_data_key_t *key);
104 hb_face_make_immutable (hb_face_t *face);
107 hb_face_is_immutable (const hb_face_t *face);
110 HB_EXTERN hb_blob_t *
111 hb_face_reference_table (const hb_face_t *face,
114 HB_EXTERN hb_blob_t *
115 hb_face_reference_blob (hb_face_t *face);
118 hb_face_set_index (hb_face_t *face,
121 HB_EXTERN unsigned int
122 hb_face_get_index (const hb_face_t *face);
125 hb_face_set_upem (hb_face_t *face,
128 HB_EXTERN unsigned int
129 hb_face_get_upem (const hb_face_t *face);
132 hb_face_set_glyph_count (hb_face_t *face,
133 unsigned int glyph_count);
135 HB_EXTERN unsigned int
136 hb_face_get_glyph_count (const hb_face_t *face);
138 HB_EXTERN unsigned int
139 hb_face_get_table_tags (const hb_face_t *face,
140 unsigned int start_offset,
141 unsigned int *table_count, /* IN/OUT */
142 hb_tag_t *table_tags /* OUT */);
150 hb_face_collect_unicodes (hb_face_t *face,
154 hb_face_collect_nominal_glyph_mapping (hb_face_t *face,
159 hb_face_collect_variation_selectors (hb_face_t *face,
163 hb_face_collect_variation_unicodes (hb_face_t *face,
164 hb_codepoint_t variation_selector,
172 HB_EXTERN hb_face_t *
173 hb_face_builder_create (void);
176 hb_face_builder_add_table (hb_face_t *face,
181 hb_face_builder_sort_tables (hb_face_t *face,
182 const hb_tag_t *tags);
187 #endif /* HB_FACE_H */