Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
hb-face.h
Go to the documentation of this file.
1/*
2 * Copyright © 2009 Red Hat, Inc.
3 *
4 * This is part of HarfBuzz, a text shaping library.
5 *
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.
11 *
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
16 * DAMAGE.
17 *
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.
23 *
24 * Red Hat Author(s): Behdad Esfahbod
25 */
26
27#if !defined(HB_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR)
28#error "Include <hb.h> instead."
29#endif
30
31#ifndef HB_FACE_H
32#define HB_FACE_H
33
34#include "hb-common.h"
35#include "hb-blob.h"
36#include "hb-map.h"
37#include "hb-set.h"
38
40
41
42HB_EXTERN unsigned int
44
45
46/*
47 * hb_face_t
48 */
49
50/**
51 * hb_face_t:
52 *
53 * Data type for holding font faces.
54 *
55 **/
56typedef struct hb_face_t hb_face_t;
57
60 unsigned int index);
61
62/**
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
67 *
68 * Callback function for hb_face_create_for_tables().
69 *
70 * Return value: (transfer full): A pointer to the @tag table within @face
71 *
72 * Since: 0.9.2
73 */
74
75typedef hb_blob_t * (*hb_reference_table_func_t) (hb_face_t *face, hb_tag_t tag, void *user_data);
76
77/* calls destroy() when not needing user_data anymore */
80 void *user_data,
81 hb_destroy_func_t destroy);
82
85
88
89HB_EXTERN void
91
95 void * data,
96 hb_destroy_func_t destroy,
97 hb_bool_t replace);
98
99HB_EXTERN void *
101 hb_user_data_key_t *key);
102
103HB_EXTERN void
105
108
109
112 hb_tag_t tag);
113
116
117HB_EXTERN void
119 unsigned int index);
120
121HB_EXTERN unsigned int
123
124HB_EXTERN void
126 unsigned int upem);
127
128HB_EXTERN unsigned int
130
131HB_EXTERN void
133 unsigned int glyph_count);
134
135HB_EXTERN unsigned int
137
138
139/**
140 * hb_get_table_tags_func_t:
141 * @face: A face object
142 * @start_offset: The index of first table tag to retrieve
143 * @table_count: (inout): Input = the maximum number of table tags to return;
144 * Output = the actual number of table tags returned (may be zero)
145 * @table_tags: (out) (array length=table_count): The array of table tags found
146 * @user_data: User data pointer passed by the caller
147 *
148 * Callback function for hb_face_get_table_tags().
149 *
150 * Return value: Total number of tables, or zero if it is not possible to list
151 *
152 * Since: 10.0.0
153 */
154typedef unsigned int (*hb_get_table_tags_func_t) (const hb_face_t *face,
155 unsigned int start_offset,
156 unsigned int *table_count, /* IN/OUT */
157 hb_tag_t *table_tags /* OUT */,
158 void *user_data);
159
160HB_EXTERN void
163 void *user_data,
164 hb_destroy_func_t destroy);
165
166HB_EXTERN unsigned int
168 unsigned int start_offset,
169 unsigned int *table_count, /* IN/OUT */
170 hb_tag_t *table_tags /* OUT */);
171
172
173/*
174 * Character set.
175 */
176
177HB_EXTERN void
179 hb_set_t *out);
180
181HB_EXTERN void
183 hb_map_t *mapping,
184 hb_set_t *unicodes);
185
186HB_EXTERN void
188 hb_set_t *out);
189
190HB_EXTERN void
192 hb_codepoint_t variation_selector,
193 hb_set_t *out);
194
195
196/*
197 * Builder face.
198 */
199
202
205 hb_tag_t tag,
206 hb_blob_t *blob);
207
208HB_EXTERN void
210 const hb_tag_t *tags);
211
212
214
215#endif /* HB_FACE_H */
guint index
struct hb_blob_t hb_blob_t
Definition hb-blob.h:84
void(* hb_destroy_func_t)(void *user_data)
Definition hb-common.h:807
HB_BEGIN_DECLS typedef int hb_bool_t
Definition hb-common.h:94
uint32_t hb_codepoint_t
Definition hb-common.h:103
#define HB_BEGIN_DECLS
Definition hb-common.h:45
uint32_t hb_tag_t
Definition hb-common.h:164
#define HB_END_DECLS
Definition hb-common.h:46
#define HB_EXTERN
Definition hb-common.h:37
HB_EXTERN void hb_face_set_upem(hb_face_t *face, unsigned int upem)
hb_blob_t *(* hb_reference_table_func_t)(hb_face_t *face, hb_tag_t tag, void *user_data)
Definition hb-face.h:75
HB_EXTERN hb_bool_t hb_face_is_immutable(const hb_face_t *face)
HB_EXTERN hb_face_t * hb_face_create(hb_blob_t *blob, unsigned int index)
HB_EXTERN unsigned int hb_face_get_index(const hb_face_t *face)
struct hb_face_t hb_face_t
Definition hb-face.h:56
HB_BEGIN_DECLS HB_EXTERN unsigned int hb_face_count(hb_blob_t *blob)
HB_EXTERN hb_bool_t hb_face_builder_add_table(hb_face_t *face, hb_tag_t tag, hb_blob_t *blob)
HB_EXTERN void hb_face_set_glyph_count(hb_face_t *face, unsigned int glyph_count)
HB_EXTERN void hb_face_destroy(hb_face_t *face)
HB_EXTERN void hb_face_set_get_table_tags_func(hb_face_t *face, hb_get_table_tags_func_t func, void *user_data, hb_destroy_func_t destroy)
HB_EXTERN void hb_face_make_immutable(hb_face_t *face)
HB_EXTERN hb_face_t * hb_face_create_for_tables(hb_reference_table_func_t reference_table_func, void *user_data, hb_destroy_func_t destroy)
HB_EXTERN void hb_face_collect_variation_selectors(hb_face_t *face, hb_set_t *out)
HB_EXTERN void hb_face_collect_nominal_glyph_mapping(hb_face_t *face, hb_map_t *mapping, hb_set_t *unicodes)
HB_EXTERN void hb_face_collect_variation_unicodes(hb_face_t *face, hb_codepoint_t variation_selector, hb_set_t *out)
HB_EXTERN unsigned int hb_face_get_upem(const hb_face_t *face)
unsigned int(* hb_get_table_tags_func_t)(const hb_face_t *face, unsigned int start_offset, unsigned int *table_count, hb_tag_t *table_tags, void *user_data)
Definition hb-face.h:154
HB_EXTERN void hb_face_set_index(hb_face_t *face, unsigned int index)
HB_EXTERN void hb_face_collect_unicodes(hb_face_t *face, hb_set_t *out)
HB_EXTERN hb_bool_t hb_face_set_user_data(hb_face_t *face, hb_user_data_key_t *key, void *data, hb_destroy_func_t destroy, hb_bool_t replace)
HB_EXTERN hb_blob_t * hb_face_reference_blob(hb_face_t *face)
HB_EXTERN unsigned int hb_face_get_glyph_count(const hb_face_t *face)
HB_EXTERN hb_face_t * hb_face_builder_create(void)
HB_EXTERN hb_blob_t * hb_face_reference_table(const hb_face_t *face, hb_tag_t tag)
HB_EXTERN unsigned int hb_face_get_table_tags(const hb_face_t *face, unsigned int start_offset, unsigned int *table_count, hb_tag_t *table_tags)
HB_EXTERN hb_face_t * hb_face_reference(hb_face_t *face)
HB_EXTERN void hb_face_builder_sort_tables(hb_face_t *face, const hb_tag_t *tags)
HB_EXTERN hb_face_t * hb_face_get_empty(void)
HB_EXTERN void * hb_face_get_user_data(const hb_face_t *face, hb_user_data_key_t *key)
struct hb_map_t hb_map_t
Definition hb-map.h:55
struct hb_set_t hb_set_t
Definition hb-set.h:57