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

Side by Side Diff: third_party/harfbuzz-ng/src/hb-buffer.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
« no previous file with comments | « third_party/harfbuzz-ng/src/hb-blob.cc ('k') | third_party/harfbuzz-ng/src/hb-buffer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright © 1998-2004 David Turner and Werner Lemberg 2 * Copyright © 1998-2004 David Turner and Werner Lemberg
3 * Copyright © 2004,2007,2009 Red Hat, Inc. 3 * Copyright © 2004,2007,2009 Red Hat, Inc.
4 * Copyright © 2011 Google, Inc. 4 * Copyright © 2011 Google, Inc.
5 * 5 *
6 * This is part of HarfBuzz, a text shaping library. 6 * This is part of HarfBuzz, a text shaping library.
7 * 7 *
8 * Permission is hereby granted, without written agreement and without 8 * Permission is hereby granted, without written agreement and without
9 * license or royalty fees, to use, copy, modify, and distribute this 9 * license or royalty fees, to use, copy, modify, and distribute this
10 * software and its documentation for any purpose, provided that the 10 * software and its documentation for any purpose, provided that the
(...skipping 22 matching lines...) Expand all
33 33
34 #ifndef HB_BUFFER_H 34 #ifndef HB_BUFFER_H
35 #define HB_BUFFER_H 35 #define HB_BUFFER_H
36 36
37 #include "hb-common.h" 37 #include "hb-common.h"
38 #include "hb-unicode.h" 38 #include "hb-unicode.h"
39 39
40 HB_BEGIN_DECLS 40 HB_BEGIN_DECLS
41 41
42 42
43 typedef struct _hb_buffer_t hb_buffer_t; 43 typedef struct hb_buffer_t hb_buffer_t;
44 44
45 typedef struct _hb_glyph_info_t { 45 typedef struct hb_glyph_info_t {
46 hb_codepoint_t codepoint; 46 hb_codepoint_t codepoint;
47 hb_mask_t mask; 47 hb_mask_t mask;
48 uint32_t cluster; 48 uint32_t cluster;
49 49
50 /*< private >*/ 50 /*< private >*/
51 hb_var_int_t var1; 51 hb_var_int_t var1;
52 hb_var_int_t var2; 52 hb_var_int_t var2;
53 } hb_glyph_info_t; 53 } hb_glyph_info_t;
54 54
55 typedef struct _hb_glyph_position_t { 55 typedef struct hb_glyph_position_t {
56 hb_position_t x_advance; 56 hb_position_t x_advance;
57 hb_position_t y_advance; 57 hb_position_t y_advance;
58 hb_position_t x_offset; 58 hb_position_t x_offset;
59 hb_position_t y_offset; 59 hb_position_t y_offset;
60 60
61 /*< private >*/ 61 /*< private >*/
62 hb_var_int_t var; 62 hb_var_int_t var;
63 } hb_glyph_position_t; 63 } hb_glyph_position_t;
64 64
65 typedef enum {
66 HB_BUFFER_CONTENT_TYPE_INVALID = 0,
67 HB_BUFFER_CONTENT_TYPE_UNICODE,
68 HB_BUFFER_CONTENT_TYPE_GLYPHS
69 } hb_buffer_content_type_t;
70
65 71
66 hb_buffer_t * 72 hb_buffer_t *
67 hb_buffer_create (void); 73 hb_buffer_create (void);
68 74
69 hb_buffer_t * 75 hb_buffer_t *
70 hb_buffer_get_empty (void); 76 hb_buffer_get_empty (void);
71 77
72 hb_buffer_t * 78 hb_buffer_t *
73 hb_buffer_reference (hb_buffer_t *buffer); 79 hb_buffer_reference (hb_buffer_t *buffer);
74 80
75 void 81 void
76 hb_buffer_destroy (hb_buffer_t *buffer); 82 hb_buffer_destroy (hb_buffer_t *buffer);
77 83
78 hb_bool_t 84 hb_bool_t
79 hb_buffer_set_user_data (hb_buffer_t *buffer, 85 hb_buffer_set_user_data (hb_buffer_t *buffer,
80 hb_user_data_key_t *key, 86 hb_user_data_key_t *key,
81 void * data, 87 void * data,
82 hb_destroy_func_t destroy, 88 hb_destroy_func_t destroy,
83 hb_bool_t replace); 89 hb_bool_t replace);
84 90
85 void * 91 void *
86 hb_buffer_get_user_data (hb_buffer_t *buffer, 92 hb_buffer_get_user_data (hb_buffer_t *buffer,
87 hb_user_data_key_t *key); 93 hb_user_data_key_t *key);
88 94
89 95
90 void 96 void
97 hb_buffer_set_content_type (hb_buffer_t *buffer,
98 hb_buffer_content_type_t content_type);
99
100 hb_buffer_content_type_t
101 hb_buffer_get_content_type (hb_buffer_t *buffer);
102
103
104 void
91 hb_buffer_set_unicode_funcs (hb_buffer_t *buffer, 105 hb_buffer_set_unicode_funcs (hb_buffer_t *buffer,
92 hb_unicode_funcs_t *unicode_funcs); 106 hb_unicode_funcs_t *unicode_funcs);
93 107
94 hb_unicode_funcs_t * 108 hb_unicode_funcs_t *
95 hb_buffer_get_unicode_funcs (hb_buffer_t *buffer); 109 hb_buffer_get_unicode_funcs (hb_buffer_t *buffer);
96 110
97 void 111 void
98 hb_buffer_set_direction (hb_buffer_t *buffer, 112 hb_buffer_set_direction (hb_buffer_t *buffer,
99 hb_direction_t direction); 113 hb_direction_t direction);
100 114
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 hb_glyph_info_t * 200 hb_glyph_info_t *
187 hb_buffer_get_glyph_infos (hb_buffer_t *buffer, 201 hb_buffer_get_glyph_infos (hb_buffer_t *buffer,
188 unsigned int *length); 202 unsigned int *length);
189 203
190 /* Return value valid as long as buffer not modified */ 204 /* Return value valid as long as buffer not modified */
191 hb_glyph_position_t * 205 hb_glyph_position_t *
192 hb_buffer_get_glyph_positions (hb_buffer_t *buffer, 206 hb_buffer_get_glyph_positions (hb_buffer_t *buffer,
193 unsigned int *length); 207 unsigned int *length);
194 208
195 209
210 /* Reorders a glyph buffer to have canonical in-cluster glyph order / position.
211 * The resulting clusters should behave identical to pre-reordering clusters.
212 * NOTE: This has nothing to do with Unicode normalization. */
213 void
214 hb_buffer_normalize_glyphs (hb_buffer_t *buffer);
215
216 /*
217 * NOT IMPLEMENTED
218 void
219 hb_buffer_normalize_characters (hb_buffer_t *buffer);
220 */
221
222
196 HB_END_DECLS 223 HB_END_DECLS
197 224
198 #endif /* HB_BUFFER_H */ 225 #endif /* HB_BUFFER_H */
OLDNEW
« no previous file with comments | « third_party/harfbuzz-ng/src/hb-blob.cc ('k') | third_party/harfbuzz-ng/src/hb-buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698