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

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

Issue 10915172: harfbuzz-ng roll (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 | Annotate | Revision Log
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 19 matching lines...) Expand all
30 30
31 #ifndef HB_FONT_H 31 #ifndef HB_FONT_H
32 #define HB_FONT_H 32 #define HB_FONT_H
33 33
34 #include "hb-common.h" 34 #include "hb-common.h"
35 #include "hb-blob.h" 35 #include "hb-blob.h"
36 36
37 HB_BEGIN_DECLS 37 HB_BEGIN_DECLS
38 38
39 39
40 typedef struct _hb_face_t hb_face_t; 40 typedef struct hb_face_t hb_face_t;
41 typedef struct _hb_font_t hb_font_t; 41 typedef struct hb_font_t hb_font_t;
42 42
43 /* 43 /*
44 * hb_face_t 44 * hb_face_t
45 */ 45 */
46 46
47 hb_face_t * 47 hb_face_t *
48 hb_face_create (hb_blob_t *blob, 48 hb_face_create (hb_blob_t *blob,
49 unsigned int index); 49 unsigned int index);
50 50
51 typedef hb_blob_t * (*hb_reference_table_func_t) (hb_face_t *face, hb_tag_t tag , void *user_data); 51 typedef hb_blob_t * (*hb_reference_table_func_t) (hb_face_t *face, hb_tag_t tag , void *user_data);
52 52
53 /* calls destroy() when not needing user_data anymore */ 53 /* calls destroy() when not needing user_data anymore */
54 hb_face_t * 54 hb_face_t *
55 hb_face_create_for_tables (hb_reference_table_func_t reference_table, 55 hb_face_create_for_tables (hb_reference_table_func_t reference_table_func,
56 void *user_data, 56 void *user_data,
57 hb_destroy_func_t destroy); 57 hb_destroy_func_t destroy);
58 58
59 hb_face_t * 59 hb_face_t *
60 hb_face_get_empty (void); 60 hb_face_get_empty (void);
61 61
62 hb_face_t * 62 hb_face_t *
63 hb_face_reference (hb_face_t *face); 63 hb_face_reference (hb_face_t *face);
64 64
65 void 65 void
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 unsigned int upem); 103 unsigned int upem);
104 104
105 unsigned int 105 unsigned int
106 hb_face_get_upem (hb_face_t *face); 106 hb_face_get_upem (hb_face_t *face);
107 107
108 108
109 /* 109 /*
110 * hb_font_funcs_t 110 * hb_font_funcs_t
111 */ 111 */
112 112
113 typedef struct _hb_font_funcs_t hb_font_funcs_t; 113 typedef struct hb_font_funcs_t hb_font_funcs_t;
114 114
115 hb_font_funcs_t * 115 hb_font_funcs_t *
116 hb_font_funcs_create (void); 116 hb_font_funcs_create (void);
117 117
118 hb_font_funcs_t * 118 hb_font_funcs_t *
119 hb_font_funcs_get_empty (void); 119 hb_font_funcs_get_empty (void);
120 120
121 hb_font_funcs_t * 121 hb_font_funcs_t *
122 hb_font_funcs_reference (hb_font_funcs_t *ffuncs); 122 hb_font_funcs_reference (hb_font_funcs_t *ffuncs);
123 123
(...skipping 12 matching lines...) Expand all
136 hb_font_funcs_get_user_data (hb_font_funcs_t *ffuncs, 136 hb_font_funcs_get_user_data (hb_font_funcs_t *ffuncs,
137 hb_user_data_key_t *key); 137 hb_user_data_key_t *key);
138 138
139 139
140 void 140 void
141 hb_font_funcs_make_immutable (hb_font_funcs_t *ffuncs); 141 hb_font_funcs_make_immutable (hb_font_funcs_t *ffuncs);
142 142
143 hb_bool_t 143 hb_bool_t
144 hb_font_funcs_is_immutable (hb_font_funcs_t *ffuncs); 144 hb_font_funcs_is_immutable (hb_font_funcs_t *ffuncs);
145 145
146 /* funcs */
147 146
148 typedef struct _hb_glyph_extents_t 147 /* glyph extents */
148
149 typedef struct hb_glyph_extents_t
149 { 150 {
150 hb_position_t x_bearing; 151 hb_position_t x_bearing;
151 hb_position_t y_bearing; 152 hb_position_t y_bearing;
152 hb_position_t width; 153 hb_position_t width;
153 hb_position_t height; 154 hb_position_t height;
154 } hb_glyph_extents_t; 155 } hb_glyph_extents_t;
155 156
156 157
157 /* func types */ 158 /* func types */
158 159
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 hb_codepoint_t glyph, 340 hb_codepoint_t glyph,
340 hb_direction_t direction, 341 hb_direction_t direction,
341 hb_glyph_extents_t *extents); 342 hb_glyph_extents_t *extents);
342 343
343 hb_bool_t 344 hb_bool_t
344 hb_font_get_glyph_contour_point_for_origin (hb_font_t *font, 345 hb_font_get_glyph_contour_point_for_origin (hb_font_t *font,
345 hb_codepoint_t glyph, unsigned int p oint_index, 346 hb_codepoint_t glyph, unsigned int p oint_index,
346 hb_direction_t direction, 347 hb_direction_t direction,
347 hb_position_t *x, hb_position_t *y); 348 hb_position_t *x, hb_position_t *y);
348 349
350 /* Generates gidDDD if glyph has no name. */
351 void
352 hb_font_glyph_to_string (hb_font_t *font,
353 hb_codepoint_t glyph,
354 char *s, unsigned int size);
355 /* Parses gidDDD and uniUUUU strings automatically. */
356 hb_bool_t
357 hb_font_glyph_from_string (hb_font_t *font,
358 const char *s, int len, /* -1 means nul-terminated */
359 hb_codepoint_t *glyph);
360
349 361
350 /* 362 /*
351 * hb_font_t 363 * hb_font_t
352 */ 364 */
353 365
354 /* Fonts are very light-weight objects */ 366 /* Fonts are very light-weight objects */
355 367
356 hb_font_t * 368 hb_font_t *
357 hb_font_create (hb_face_t *face); 369 hb_font_create (hb_face_t *face);
358 370
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 438
427 void 439 void
428 hb_font_get_ppem (hb_font_t *font, 440 hb_font_get_ppem (hb_font_t *font,
429 unsigned int *x_ppem, 441 unsigned int *x_ppem,
430 unsigned int *y_ppem); 442 unsigned int *y_ppem);
431 443
432 444
433 HB_END_DECLS 445 HB_END_DECLS
434 446
435 #endif /* HB_FONT_H */ 447 #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