Lines Matching refs:buffer
102 output_char (hb_buffer_t *buffer, hb_codepoint_t unichar, hb_codepoint_t glyph) in output_char() argument
105 buffer->cur().glyph_index() = glyph; in output_char()
106 (void) buffer->output_glyph (unichar); in output_char()
107 _hb_glyph_info_set_unicode_props (&buffer->prev(), buffer); in output_char()
111 next_char (hb_buffer_t *buffer, hb_codepoint_t glyph) in next_char() argument
113 buffer->cur().glyph_index() = glyph; in next_char()
114 (void) buffer->next_glyph (); in next_char()
118 skip_char (hb_buffer_t *buffer) in skip_char() argument
120 buffer->skip_glyph (); in skip_char()
128 hb_buffer_t * const buffer = c->buffer; in decompose() local
138 output_char (buffer, a, a_glyph); in decompose()
140 output_char (buffer, b, b_glyph); in decompose()
148 output_char (buffer, b, b_glyph); in decompose()
155 output_char (buffer, a, a_glyph); in decompose()
157 output_char (buffer, b, b_glyph); in decompose()
169 hb_buffer_t * const buffer = c->buffer; in decompose_current_character() local
170 hb_codepoint_t u = buffer->cur().codepoint; in decompose_current_character()
175 next_char (buffer, glyph); in decompose_current_character()
181 skip_char (buffer); in decompose_current_character()
187 next_char (buffer, glyph); in decompose_current_character()
191 if (_hb_glyph_info_is_unicode_space (&buffer->cur())) in decompose_current_character()
194 hb_unicode_funcs_t::space_t space_type = buffer->unicode->space_fallback_type (u); in decompose_current_character()
196 (c->font->get_nominal_glyph (0x0020, &space_glyph) || (space_glyph = buffer->invisible))) in decompose_current_character()
198 _hb_glyph_info_set_unicode_space_fallback_type (&buffer->cur(), space_type); in decompose_current_character()
199 next_char (buffer, space_glyph); in decompose_current_character()
200 buffer->scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_SPACE_FALLBACK; in decompose_current_character()
212 next_char (buffer, other_glyph); in decompose_current_character()
217 next_char (buffer, glyph); /* glyph is initialized in earlier branches. */ in decompose_current_character()
226 hb_buffer_t * const buffer = c->buffer; in handle_variation_selector_cluster() local
228 for (; buffer->idx < end - 1 && buffer->successful;) { in handle_variation_selector_cluster()
229 if (unlikely (buffer->unicode->is_variation_selector (buffer->cur(+1).codepoint))) { in handle_variation_selector_cluster()
230 …if (font->get_variation_glyph (buffer->cur().codepoint, buffer->cur(+1).codepoint, &buffer->cur().… in handle_variation_selector_cluster()
232 hb_codepoint_t unicode = buffer->cur().codepoint; in handle_variation_selector_cluster()
233 (void) buffer->replace_glyphs (2, 1, &unicode); in handle_variation_selector_cluster()
238 set_glyph (buffer->cur(), font); in handle_variation_selector_cluster()
239 (void) buffer->next_glyph (); in handle_variation_selector_cluster()
240 set_glyph (buffer->cur(), font); in handle_variation_selector_cluster()
241 (void) buffer->next_glyph (); in handle_variation_selector_cluster()
244 while (buffer->idx < end && in handle_variation_selector_cluster()
245 buffer->successful && in handle_variation_selector_cluster()
246 unlikely (buffer->unicode->is_variation_selector (buffer->cur().codepoint))) in handle_variation_selector_cluster()
248 set_glyph (buffer->cur(), font); in handle_variation_selector_cluster()
249 (void) buffer->next_glyph (); in handle_variation_selector_cluster()
254 set_glyph (buffer->cur(), font); in handle_variation_selector_cluster()
255 (void) buffer->next_glyph (); in handle_variation_selector_cluster()
258 if (likely (buffer->idx < end)) in handle_variation_selector_cluster()
260 set_glyph (buffer->cur(), font); in handle_variation_selector_cluster()
261 (void) buffer->next_glyph (); in handle_variation_selector_cluster()
268 hb_buffer_t * const buffer = c->buffer; in decompose_multi_char_cluster() local
269 for (unsigned int i = buffer->idx; i < end && buffer->successful; i++) in decompose_multi_char_cluster()
270 if (unlikely (buffer->unicode->is_variation_selector (buffer->info[i].codepoint))) { in decompose_multi_char_cluster()
275 while (buffer->idx < end && buffer->successful) in decompose_multi_char_cluster()
292 hb_buffer_t *buffer, in _hb_ot_shape_normalize() argument
295 if (unlikely (!buffer->len)) return; in _hb_ot_shape_normalize()
297 _hb_buffer_assert_unicode_vars (buffer); in _hb_ot_shape_normalize()
312 buffer, in _hb_ot_shape_normalize()
314 buffer->unicode, in _hb_ot_shape_normalize()
315 buffer->not_found, in _hb_ot_shape_normalize()
337 buffer->clear_output (); in _hb_ot_shape_normalize()
338 count = buffer->len; in _hb_ot_shape_normalize()
339 buffer->idx = 0; in _hb_ot_shape_normalize()
343 for (end = buffer->idx + 1; end < count; end++) in _hb_ot_shape_normalize()
344 if (_hb_glyph_info_is_unicode_mark (&buffer->info[end])) in _hb_ot_shape_normalize()
353 unsigned int done = font->get_nominal_glyphs (end - buffer->idx, in _hb_ot_shape_normalize()
354 &buffer->cur().codepoint, in _hb_ot_shape_normalize()
355 sizeof (buffer->info[0]), in _hb_ot_shape_normalize()
356 &buffer->cur().glyph_index(), in _hb_ot_shape_normalize()
357 sizeof (buffer->info[0])); in _hb_ot_shape_normalize()
358 if (unlikely (!buffer->next_glyphs (done))) break; in _hb_ot_shape_normalize()
360 while (buffer->idx < end && buffer->successful) in _hb_ot_shape_normalize()
363 if (buffer->idx == count || !buffer->successful) in _hb_ot_shape_normalize()
369 for (end = buffer->idx + 1; end < count; end++) in _hb_ot_shape_normalize()
370 if (!_hb_glyph_info_is_unicode_mark(&buffer->info[end])) in _hb_ot_shape_normalize()
376 while (buffer->idx < count && buffer->successful); in _hb_ot_shape_normalize()
377 buffer->sync (); in _hb_ot_shape_normalize()
383 if (!all_simple && buffer->message(font, "start reorder")) in _hb_ot_shape_normalize()
385 count = buffer->len; in _hb_ot_shape_normalize()
388 if (_hb_glyph_info_get_modified_combining_class (&buffer->info[i]) == 0) in _hb_ot_shape_normalize()
393 if (_hb_glyph_info_get_modified_combining_class (&buffer->info[end]) == 0) in _hb_ot_shape_normalize()
402 buffer->sort (i, end, compare_combining_class); in _hb_ot_shape_normalize()
405 plan->shaper->reorder_marks (plan, buffer, i, end); in _hb_ot_shape_normalize()
409 (void) buffer->message(font, "end reorder"); in _hb_ot_shape_normalize()
411 if (buffer->scratch_flags & HB_BUFFER_SCRATCH_FLAG_HAS_CGJ) in _hb_ot_shape_normalize()
417 for (unsigned int i = 1; i + 1 < buffer->len; i++) in _hb_ot_shape_normalize()
418 if (buffer->info[i].codepoint == 0x034Fu/*CGJ*/ && in _hb_ot_shape_normalize()
419 (info_cc(buffer->info[i+1]) == 0 || info_cc(buffer->info[i-1]) <= info_cc(buffer->info[i+1]))) in _hb_ot_shape_normalize()
421 _hb_glyph_info_unhide (&buffer->info[i]); in _hb_ot_shape_normalize()
429 buffer->successful && in _hb_ot_shape_normalize()
436 buffer->clear_output (); in _hb_ot_shape_normalize()
437 count = buffer->len; in _hb_ot_shape_normalize()
439 (void) buffer->next_glyph (); in _hb_ot_shape_normalize()
440 while (buffer->idx < count /* No need for: && buffer->successful */) in _hb_ot_shape_normalize()
447 _hb_glyph_info_is_unicode_mark(&buffer->cur())) in _hb_ot_shape_normalize()
451 (starter == buffer->out_len - 1 || in _hb_ot_shape_normalize()
452 info_cc (buffer->prev()) < info_cc (buffer->cur())) && in _hb_ot_shape_normalize()
455 buffer->out_info[starter].codepoint, in _hb_ot_shape_normalize()
456 buffer->cur().codepoint, in _hb_ot_shape_normalize()
462 if (unlikely (!buffer->next_glyph ())) break; /* Copy to out-buffer. */ in _hb_ot_shape_normalize()
463 buffer->merge_out_clusters (starter, buffer->out_len); in _hb_ot_shape_normalize()
464 buffer->out_len--; /* Remove the second composable. */ in _hb_ot_shape_normalize()
466 buffer->out_info[starter].codepoint = composed; in _hb_ot_shape_normalize()
467 buffer->out_info[starter].glyph_index() = glyph; in _hb_ot_shape_normalize()
468 _hb_glyph_info_set_unicode_props (&buffer->out_info[starter], buffer); in _hb_ot_shape_normalize()
475 if (unlikely (!buffer->next_glyph ())) break; in _hb_ot_shape_normalize()
477 if (info_cc (buffer->prev()) == 0) in _hb_ot_shape_normalize()
478 starter = buffer->out_len - 1; in _hb_ot_shape_normalize()
480 buffer->sync (); in _hb_ot_shape_normalize()