Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(176)

Side by Side Diff: third_party/harfbuzz-ng/src/hb-font.h

Issue 10510004: Roll harfbuzz-ng 3b8fd9c48f4bde368bf2d465c148b9743a9216ee (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright © 2009 Red Hat, Inc. 2 * Copyright © 2009 Red Hat, Inc.
3 * 3 *
4 * This is part of HarfBuzz, a text shaping library. 4 * This is part of HarfBuzz, a text shaping library.
5 * 5 *
6 * Permission is hereby granted, without written agreement and without 6 * Permission is hereby granted, without written agreement and without
7 * license or royalty fees, to use, copy, modify, and distribute this 7 * license or royalty fees, to use, copy, modify, and distribute this
8 * software and its documentation for any purpose, provided that the 8 * software and its documentation for any purpose, provided that the
9 * above copyright notice and the following two paragraphs appear in 9 * above copyright notice and the following two paragraphs appear in
10 * all copies of this software. 10 * all copies of this software.
11 * 11 *
12 * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR 12 * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
13 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES 13 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
14 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN 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 15 * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
16 * DAMAGE. 16 * DAMAGE.
17 * 17 *
18 * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, 18 * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
19 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 19 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
20 * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS 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 21 * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
22 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 22 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
23 * 23 *
24 * Red Hat Author(s): Behdad Esfahbod 24 * Red Hat Author(s): Behdad Esfahbod
25 */ 25 */
26 26
27 #ifndef HB_H_IN
28 #error "Include <hb.h> instead."
29 #endif
30
27 #ifndef HB_FONT_H 31 #ifndef HB_FONT_H
28 #define HB_FONT_H 32 #define HB_FONT_H
29 33
30 #include "hb-common.h" 34 #include "hb-common.h"
31 #include "hb-blob.h" 35 #include "hb-blob.h"
32 36
33 HB_BEGIN_DECLS 37 HB_BEGIN_DECLS
34 38
35 39
36 typedef struct _hb_face_t hb_face_t; 40 typedef struct _hb_face_t hb_face_t;
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 typedef hb_bool_t (*hb_font_get_glyph_extents_func_t) (hb_font_t *font, void *fo nt_data, 185 typedef hb_bool_t (*hb_font_get_glyph_extents_func_t) (hb_font_t *font, void *fo nt_data,
182 hb_codepoint_t glyph, 186 hb_codepoint_t glyph,
183 hb_glyph_extents_t *exten ts, 187 hb_glyph_extents_t *exten ts,
184 void *user_data); 188 void *user_data);
185 typedef hb_bool_t (*hb_font_get_glyph_contour_point_func_t) (hb_font_t *font, vo id *font_data, 189 typedef hb_bool_t (*hb_font_get_glyph_contour_point_func_t) (hb_font_t *font, vo id *font_data,
186 hb_codepoint_t glyp h, unsigned int point_index, 190 hb_codepoint_t glyp h, unsigned int point_index,
187 hb_position_t *x, h b_position_t *y, 191 hb_position_t *x, h b_position_t *y,
188 void *user_data); 192 void *user_data);
189 193
190 194
195 typedef hb_bool_t (*hb_font_get_glyph_name_func_t) (hb_font_t *font, void *font_ data,
196 hb_codepoint_t glyph,
197 char *name, unsigned int siz e,
198 void *user_data);
199 typedef hb_bool_t (*hb_font_get_glyph_from_name_func_t) (hb_font_t *font, void * font_data,
200 const char *name, int l en, /* -1 means nul-terminated */
201 hb_codepoint_t *glyph,
202 void *user_data);
203
204
191 /* func setters */ 205 /* func setters */
192 206
193 void 207 void
194 hb_font_funcs_set_glyph_func (hb_font_funcs_t *ffuncs, 208 hb_font_funcs_set_glyph_func (hb_font_funcs_t *ffuncs,
195 hb_font_get_glyph_func_t glyph_func, 209 hb_font_get_glyph_func_t glyph_func,
196 void *user_data, hb_destroy_func_t destroy); 210 void *user_data, hb_destroy_func_t destroy);
197 211
198 void 212 void
199 hb_font_funcs_set_glyph_h_advance_func (hb_font_funcs_t *ffuncs, 213 hb_font_funcs_set_glyph_h_advance_func (hb_font_funcs_t *ffuncs,
200 hb_font_get_glyph_h_advance_func_t func, 214 hb_font_get_glyph_h_advance_func_t func,
(...skipping 23 matching lines...) Expand all
224 238
225 void 239 void
226 hb_font_funcs_set_glyph_extents_func (hb_font_funcs_t *ffuncs, 240 hb_font_funcs_set_glyph_extents_func (hb_font_funcs_t *ffuncs,
227 hb_font_get_glyph_extents_func_t func, 241 hb_font_get_glyph_extents_func_t func,
228 void *user_data, hb_destroy_func_t destroy ); 242 void *user_data, hb_destroy_func_t destroy );
229 void 243 void
230 hb_font_funcs_set_glyph_contour_point_func (hb_font_funcs_t *ffuncs, 244 hb_font_funcs_set_glyph_contour_point_func (hb_font_funcs_t *ffuncs,
231 hb_font_get_glyph_contour_point_func _t func, 245 hb_font_get_glyph_contour_point_func _t func,
232 void *user_data, hb_destroy_func_t d estroy); 246 void *user_data, hb_destroy_func_t d estroy);
233 247
248 void
249 hb_font_funcs_set_glyph_name_func (hb_font_funcs_t *ffuncs,
250 hb_font_get_glyph_name_func_t glyph_func,
251 void *user_data, hb_destroy_func_t destroy);
252 void
253 hb_font_funcs_set_glyph_from_name_func (hb_font_funcs_t *ffuncs,
254 hb_font_get_glyph_from_name_func_t glyph _func,
255 void *user_data, hb_destroy_func_t destr oy);
256
234 257
235 /* func dispatch */ 258 /* func dispatch */
236 259
237 hb_bool_t 260 hb_bool_t
238 hb_font_get_glyph (hb_font_t *font, 261 hb_font_get_glyph (hb_font_t *font,
239 hb_codepoint_t unicode, hb_codepoint_t variation_selector, 262 hb_codepoint_t unicode, hb_codepoint_t variation_selector,
240 hb_codepoint_t *glyph); 263 hb_codepoint_t *glyph);
241 264
242 hb_position_t 265 hb_position_t
243 hb_font_get_glyph_h_advance (hb_font_t *font, 266 hb_font_get_glyph_h_advance (hb_font_t *font,
(...skipping 21 matching lines...) Expand all
265 hb_bool_t 288 hb_bool_t
266 hb_font_get_glyph_extents (hb_font_t *font, 289 hb_font_get_glyph_extents (hb_font_t *font,
267 hb_codepoint_t glyph, 290 hb_codepoint_t glyph,
268 hb_glyph_extents_t *extents); 291 hb_glyph_extents_t *extents);
269 292
270 hb_bool_t 293 hb_bool_t
271 hb_font_get_glyph_contour_point (hb_font_t *font, 294 hb_font_get_glyph_contour_point (hb_font_t *font,
272 hb_codepoint_t glyph, unsigned int point_index, 295 hb_codepoint_t glyph, unsigned int point_index,
273 hb_position_t *x, hb_position_t *y); 296 hb_position_t *x, hb_position_t *y);
274 297
298 hb_bool_t
299 hb_font_get_glyph_name (hb_font_t *font,
300 hb_codepoint_t glyph,
301 char *name, unsigned int size);
302 hb_bool_t
303 hb_font_get_glyph_from_name (hb_font_t *font,
304 const char *name, int len, /* -1 means nul-terminat ed */
305 hb_codepoint_t *glyph);
306
275 307
276 /* high-level funcs, with fallback */ 308 /* high-level funcs, with fallback */
277 309
278 void 310 void
279 hb_font_get_glyph_advance_for_direction (hb_font_t *font, 311 hb_font_get_glyph_advance_for_direction (hb_font_t *font,
280 hb_codepoint_t glyph, 312 hb_codepoint_t glyph,
281 hb_direction_t direction, 313 hb_direction_t direction,
282 hb_position_t *x, hb_position_t *y); 314 hb_position_t *x, hb_position_t *y);
283 void 315 void
284 hb_font_get_glyph_origin_for_direction (hb_font_t *font, 316 hb_font_get_glyph_origin_for_direction (hb_font_t *font,
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 426
395 void 427 void
396 hb_font_get_ppem (hb_font_t *font, 428 hb_font_get_ppem (hb_font_t *font,
397 unsigned int *x_ppem, 429 unsigned int *x_ppem,
398 unsigned int *y_ppem); 430 unsigned int *y_ppem);
399 431
400 432
401 HB_END_DECLS 433 HB_END_DECLS
402 434
403 #endif /* HB_FONT_H */ 435 #endif /* HB_FONT_H */
OLDNEW
« no previous file with comments | « third_party/harfbuzz-ng/src/hb-fallback-shape-private.hh ('k') | third_party/harfbuzz-ng/src/hb-font.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698