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

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

Issue 396393005: Roll HarfBuzz to 0.9.32 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Another cherry-pick Created 6 years, 5 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 © 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,2012 Google, Inc. 4 * Copyright © 2011,2012 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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 } hb_buffer_flags_t; 179 } hb_buffer_flags_t;
180 180
181 void 181 void
182 hb_buffer_set_flags (hb_buffer_t *buffer, 182 hb_buffer_set_flags (hb_buffer_t *buffer,
183 hb_buffer_flags_t flags); 183 hb_buffer_flags_t flags);
184 184
185 hb_buffer_flags_t 185 hb_buffer_flags_t
186 hb_buffer_get_flags (hb_buffer_t *buffer); 186 hb_buffer_get_flags (hb_buffer_t *buffer);
187 187
188 188
189
190 #define HB_BUFFER_REPLACEMENT_CODEPOINT_DEFAULT 0xFFFDu
191
192 /* Sets codepoint used to replace invalid UTF-8/16/32 entries.
193 * Default is 0xFFFDu. */
194 void
195 hb_buffer_set_replacement_codepoint (hb_buffer_t *buffer,
196 hb_codepoint_t replacement);
197
198 hb_codepoint_t
199 hb_buffer_get_replacement_codepoint (hb_buffer_t *buffer);
200
201
189 /* Resets the buffer. Afterwards it's as if it was just created, 202 /* Resets the buffer. Afterwards it's as if it was just created,
190 * except that it has a larger buffer allocated perhaps... */ 203 * except that it has a larger buffer allocated perhaps... */
191 void 204 void
192 hb_buffer_reset (hb_buffer_t *buffer); 205 hb_buffer_reset (hb_buffer_t *buffer);
193 206
194 /* Like reset, but does NOT clear unicode_funcs. */ 207 /* Like reset, but does NOT clear unicode_funcs and replacement_codepoint. */
195 void 208 void
196 hb_buffer_clear_contents (hb_buffer_t *buffer); 209 hb_buffer_clear_contents (hb_buffer_t *buffer);
197 210
198 /* Returns false if allocation failed */ 211 /* Returns false if allocation failed */
199 hb_bool_t 212 hb_bool_t
200 hb_buffer_pre_allocate (hb_buffer_t *buffer, 213 hb_buffer_pre_allocate (hb_buffer_t *buffer,
201 unsigned int size); 214 unsigned int size);
202 215
203 216
204 /* Returns false if allocation has failed before */ 217 /* Returns false if allocation has failed before */
(...skipping 28 matching lines...) Expand all
233 unsigned int item_offset, 246 unsigned int item_offset,
234 int item_length); 247 int item_length);
235 248
236 void 249 void
237 hb_buffer_add_utf32 (hb_buffer_t *buffer, 250 hb_buffer_add_utf32 (hb_buffer_t *buffer,
238 const uint32_t *text, 251 const uint32_t *text,
239 int text_length, 252 int text_length,
240 unsigned int item_offset, 253 unsigned int item_offset,
241 int item_length); 254 int item_length);
242 255
256 /* Like add_utf32 but does NOT check for invalid Unicode codepoints. */
257 void
258 hb_buffer_add_codepoints (hb_buffer_t *buffer,
259 const hb_codepoint_t *text,
260 int text_length,
261 unsigned int item_offset,
262 int item_length);
263
243 264
244 /* Clears any new items added at the end */ 265 /* Clears any new items added at the end */
245 hb_bool_t 266 hb_bool_t
246 hb_buffer_set_length (hb_buffer_t *buffer, 267 hb_buffer_set_length (hb_buffer_t *buffer,
247 unsigned int length); 268 unsigned int length);
248 269
249 /* Return value valid as long as buffer not modified */ 270 /* Return value valid as long as buffer not modified */
250 unsigned int 271 unsigned int
251 hb_buffer_get_length (hb_buffer_t *buffer); 272 hb_buffer_get_length (hb_buffer_t *buffer);
252 273
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 const char *buf, 335 const char *buf,
315 int buf_len, /* -1 means nul-terminated */ 336 int buf_len, /* -1 means nul-terminated */
316 const char **end_ptr, /* May be NULL */ 337 const char **end_ptr, /* May be NULL */
317 hb_font_t *font, /* May be NULL */ 338 hb_font_t *font, /* May be NULL */
318 hb_buffer_serialize_format_t format); 339 hb_buffer_serialize_format_t format);
319 340
320 341
321 HB_END_DECLS 342 HB_END_DECLS
322 343
323 #endif /* HB_BUFFER_H */ 344 #endif /* HB_BUFFER_H */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698