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

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

Issue 1867053004: Roll HarfBuzz to 1.2.6 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Roll to 1.2.6 instead Created 4 years, 8 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.
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 109
110 /* func types */ 110 /* func types */
111 111
112 typedef hb_bool_t (*hb_font_get_font_extents_func_t) (hb_font_t *font, void *fon t_data, 112 typedef hb_bool_t (*hb_font_get_font_extents_func_t) (hb_font_t *font, void *fon t_data,
113 hb_font_extents_t *metric s, 113 hb_font_extents_t *metric s,
114 void *user_data); 114 void *user_data);
115 typedef hb_font_get_font_extents_func_t hb_font_get_font_h_extents_func_t; 115 typedef hb_font_get_font_extents_func_t hb_font_get_font_h_extents_func_t;
116 typedef hb_font_get_font_extents_func_t hb_font_get_font_v_extents_func_t; 116 typedef hb_font_get_font_extents_func_t hb_font_get_font_v_extents_func_t;
117 117
118 118
119 typedef hb_bool_t (*hb_font_get_glyph_func_t) (hb_font_t *font, void *font_data, 119 typedef hb_bool_t (*hb_font_get_nominal_glyph_func_t) (hb_font_t *font, void *fo nt_data,
120 » » » » » hb_codepoint_t unicode, hb_codepo int_t variation_selector, 120 » » » » » » hb_codepoint_t unicode,
121 » » » » » hb_codepoint_t *glyph, 121 » » » » » » hb_codepoint_t *glyph,
122 » » » » » void *user_data); 122 » » » » » » void *user_data);
123 typedef hb_bool_t (*hb_font_get_variation_glyph_func_t) (hb_font_t *font, void * font_data,
124 » » » » » » » hb_codepoint_t unicode, hb_codepoint_t variation_selector,
125 » » » » » » » hb_codepoint_t *glyph,
126 » » » » » » » void *user_data);
123 127
124 128
125 typedef hb_position_t (*hb_font_get_glyph_advance_func_t) (hb_font_t *font, void *font_data, 129 typedef hb_position_t (*hb_font_get_glyph_advance_func_t) (hb_font_t *font, void *font_data,
126 hb_codepoint_t glyph, 130 hb_codepoint_t glyph,
127 void *user_data); 131 void *user_data);
128 typedef hb_font_get_glyph_advance_func_t hb_font_get_glyph_h_advance_func_t; 132 typedef hb_font_get_glyph_advance_func_t hb_font_get_glyph_h_advance_func_t;
129 typedef hb_font_get_glyph_advance_func_t hb_font_get_glyph_v_advance_func_t; 133 typedef hb_font_get_glyph_advance_func_t hb_font_get_glyph_v_advance_func_t;
130 134
131 typedef hb_bool_t (*hb_font_get_glyph_origin_func_t) (hb_font_t *font, void *fon t_data, 135 typedef hb_bool_t (*hb_font_get_glyph_origin_func_t) (hb_font_t *font, void *fon t_data,
132 hb_codepoint_t glyph, 136 hb_codepoint_t glyph,
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 * 194 *
191 * 195 *
192 * Since: 1.1.2 196 * Since: 1.1.2
193 **/ 197 **/
194 HB_EXTERN void 198 HB_EXTERN void
195 hb_font_funcs_set_font_v_extents_func (hb_font_funcs_t *ffuncs, 199 hb_font_funcs_set_font_v_extents_func (hb_font_funcs_t *ffuncs,
196 hb_font_get_font_v_extents_func_t func, 200 hb_font_get_font_v_extents_func_t func,
197 void *user_data, hb_destroy_func_t destro y); 201 void *user_data, hb_destroy_func_t destro y);
198 202
199 /** 203 /**
200 * hb_font_funcs_set_glyph_func: 204 * hb_font_funcs_set_nominal_glyph_func:
201 * @ffuncs: font functions. 205 * @ffuncs: font functions.
202 * @func: (closure user_data) (destroy destroy) (scope notified): 206 * @func: (closure user_data) (destroy destroy) (scope notified):
203 * @user_data: 207 * @user_data:
204 * @destroy: 208 * @destroy:
205 * 209 *
206 * 210 *
207 * 211 *
208 * Since: 0.9.2 212 * Since: 1.2.3
209 **/ 213 **/
210 HB_EXTERN void 214 HB_EXTERN void
211 hb_font_funcs_set_glyph_func (hb_font_funcs_t *ffuncs, 215 hb_font_funcs_set_nominal_glyph_func (hb_font_funcs_t *ffuncs,
212 » » » hb_font_get_glyph_func_t func, 216 » » » » hb_font_get_nominal_glyph_func_t func,
213 » » » void *user_data, hb_destroy_func_t destroy); 217 » » » » void *user_data, hb_destroy_func_t destroy );
218
219 /**
220 * hb_font_funcs_set_variation_glyph_func:
221 * @ffuncs: font functions.
222 * @func: (closure user_data) (destroy destroy) (scope notified):
223 * @user_data:
224 * @destroy:
225 *
226 *
227 *
228 * Since: 1.2.3
229 **/
230 HB_EXTERN void
231 hb_font_funcs_set_variation_glyph_func (hb_font_funcs_t *ffuncs,
232 » » » » » hb_font_get_variation_glyph_func_t func,
233 » » » » » void *user_data, hb_destroy_func_t destr oy);
214 234
215 /** 235 /**
216 * hb_font_funcs_set_glyph_h_advance_func: 236 * hb_font_funcs_set_glyph_h_advance_func:
217 * @ffuncs: font functions. 237 * @ffuncs: font functions.
218 * @func: (closure user_data) (destroy destroy) (scope notified): 238 * @func: (closure user_data) (destroy destroy) (scope notified):
219 * @user_data: 239 * @user_data:
220 * @destroy: 240 * @destroy:
221 * 241 *
222 * 242 *
223 * 243 *
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 /* func dispatch */ 395 /* func dispatch */
376 396
377 HB_EXTERN hb_bool_t 397 HB_EXTERN hb_bool_t
378 hb_font_get_h_extents (hb_font_t *font, 398 hb_font_get_h_extents (hb_font_t *font,
379 hb_font_extents_t *extents); 399 hb_font_extents_t *extents);
380 HB_EXTERN hb_bool_t 400 HB_EXTERN hb_bool_t
381 hb_font_get_v_extents (hb_font_t *font, 401 hb_font_get_v_extents (hb_font_t *font,
382 hb_font_extents_t *extents); 402 hb_font_extents_t *extents);
383 403
384 HB_EXTERN hb_bool_t 404 HB_EXTERN hb_bool_t
385 hb_font_get_glyph (hb_font_t *font, 405 hb_font_get_nominal_glyph (hb_font_t *font,
386 » » hb_codepoint_t unicode, hb_codepoint_t variation_selector, 406 » » » hb_codepoint_t unicode,
387 » » hb_codepoint_t *glyph); 407 » » » hb_codepoint_t *glyph);
408 HB_EXTERN hb_bool_t
409 hb_font_get_variation_glyph (hb_font_t *font,
410 » » » hb_codepoint_t unicode, hb_codepoint_t variation_se lector,
411 » » » hb_codepoint_t *glyph);
388 412
389 HB_EXTERN hb_position_t 413 HB_EXTERN hb_position_t
390 hb_font_get_glyph_h_advance (hb_font_t *font, 414 hb_font_get_glyph_h_advance (hb_font_t *font,
391 hb_codepoint_t glyph); 415 hb_codepoint_t glyph);
392 HB_EXTERN hb_position_t 416 HB_EXTERN hb_position_t
393 hb_font_get_glyph_v_advance (hb_font_t *font, 417 hb_font_get_glyph_v_advance (hb_font_t *font,
394 hb_codepoint_t glyph); 418 hb_codepoint_t glyph);
395 419
396 HB_EXTERN hb_bool_t 420 HB_EXTERN hb_bool_t
397 hb_font_get_glyph_h_origin (hb_font_t *font, 421 hb_font_get_glyph_h_origin (hb_font_t *font,
(...skipping 26 matching lines...) Expand all
424 hb_codepoint_t glyph, 448 hb_codepoint_t glyph,
425 char *name, unsigned int size); 449 char *name, unsigned int size);
426 HB_EXTERN hb_bool_t 450 HB_EXTERN hb_bool_t
427 hb_font_get_glyph_from_name (hb_font_t *font, 451 hb_font_get_glyph_from_name (hb_font_t *font,
428 const char *name, int len, /* -1 means nul-terminat ed */ 452 const char *name, int len, /* -1 means nul-terminat ed */
429 hb_codepoint_t *glyph); 453 hb_codepoint_t *glyph);
430 454
431 455
432 /* high-level funcs, with fallback */ 456 /* high-level funcs, with fallback */
433 457
458 /* Calls either hb_font_get_nominal_glyph() if variation_selector is 0,
459 * otherwise callse hb_font_get_variation_glyph(). */
460 HB_EXTERN hb_bool_t
461 hb_font_get_glyph (hb_font_t *font,
462 hb_codepoint_t unicode, hb_codepoint_t variation_selector,
463 hb_codepoint_t *glyph);
464
434 HB_EXTERN void 465 HB_EXTERN void
435 hb_font_get_extents_for_direction (hb_font_t *font, 466 hb_font_get_extents_for_direction (hb_font_t *font,
436 hb_direction_t direction, 467 hb_direction_t direction,
437 hb_font_extents_t *extents); 468 hb_font_extents_t *extents);
438 HB_EXTERN void 469 HB_EXTERN void
439 hb_font_get_glyph_advance_for_direction (hb_font_t *font, 470 hb_font_get_glyph_advance_for_direction (hb_font_t *font,
440 hb_codepoint_t glyph, 471 hb_codepoint_t glyph,
441 hb_direction_t direction, 472 hb_direction_t direction,
442 hb_position_t *x, hb_position_t *y); 473 hb_position_t *x, hb_position_t *y);
443 HB_EXTERN void 474 HB_EXTERN void
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 600
570 HB_EXTERN void 601 HB_EXTERN void
571 hb_font_get_ppem (hb_font_t *font, 602 hb_font_get_ppem (hb_font_t *font,
572 unsigned int *x_ppem, 603 unsigned int *x_ppem,
573 unsigned int *y_ppem); 604 unsigned int *y_ppem);
574 605
575 606
576 HB_END_DECLS 607 HB_END_DECLS
577 608
578 #endif /* HB_FONT_H */ 609 #endif /* HB_FONT_H */
OLDNEW
« no previous file with comments | « third_party/harfbuzz-ng/src/hb-fallback-shape.cc ('k') | third_party/harfbuzz-ng/src/hb-font.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698