Lines Matching refs:buffer
98 output_char (hb_buffer_t *buffer, hb_codepoint_t unichar, hb_codepoint_t glyph) in output_char() argument
100 buffer->cur().glyph_index() = glyph; in output_char()
101 buffer->output_glyph (unichar); /* This is very confusing indeed. */ in output_char()
102 _hb_glyph_info_set_unicode_props (&buffer->prev(), buffer); in output_char()
106 next_char (hb_buffer_t *buffer, hb_codepoint_t glyph) in next_char() argument
108 buffer->cur().glyph_index() = glyph; in next_char()
109 buffer->next_glyph (); in next_char()
113 skip_char (hb_buffer_t *buffer) in skip_char() argument
115 buffer->skip_glyph (); in skip_char()
123 hb_buffer_t * const buffer = c->buffer; in decompose() local
133 output_char (buffer, a, a_glyph); in decompose()
135 output_char (buffer, b, b_glyph); in decompose()
144 output_char (buffer, b, b_glyph); in decompose()
151 output_char (buffer, a, a_glyph); in decompose()
153 output_char (buffer, b, b_glyph); in decompose()
165 hb_buffer_t * const buffer = c->buffer; in decompose_current_character() local
166 hb_codepoint_t u = buffer->cur().codepoint; in decompose_current_character()
171 next_char (buffer, glyph); in decompose_current_character()
177 skip_char (buffer); in decompose_current_character()
183 next_char (buffer, glyph); in decompose_current_character()
187 if (_hb_glyph_info_is_unicode_space (&buffer->cur())) in decompose_current_character()
190 hb_unicode_funcs_t::space_t space_type = buffer->unicode->space_fallback_type (u); in decompose_current_character()
193 _hb_glyph_info_set_unicode_space_fallback_type (&buffer->cur(), space_type); in decompose_current_character()
194 next_char (buffer, space_glyph); in decompose_current_character()
195 buffer->scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_SPACE_FALLBACK; in decompose_current_character()
207 next_char (buffer, other_glyph); in decompose_current_character()
212 next_char (buffer, glyph); /* glyph is initialized in earlier branches. */ in decompose_current_character()
221 hb_buffer_t * const buffer = c->buffer; in handle_variation_selector_cluster() local
223 for (; buffer->idx < end - 1 && buffer->successful;) { in handle_variation_selector_cluster()
224 if (unlikely (buffer->unicode->is_variation_selector (buffer->cur(+1).codepoint))) { in handle_variation_selector_cluster()
225 …if (font->get_variation_glyph (buffer->cur().codepoint, buffer->cur(+1).codepoint, &buffer->cur().… in handle_variation_selector_cluster()
227 hb_codepoint_t unicode = buffer->cur().codepoint; in handle_variation_selector_cluster()
228 buffer->replace_glyphs (2, 1, &unicode); in handle_variation_selector_cluster()
233 set_glyph (buffer->cur(), font); in handle_variation_selector_cluster()
234 buffer->next_glyph (); in handle_variation_selector_cluster()
235 set_glyph (buffer->cur(), font); in handle_variation_selector_cluster()
236 buffer->next_glyph (); in handle_variation_selector_cluster()
239 …while (buffer->idx < end && unlikely (buffer->unicode->is_variation_selector (buffer->cur().codepo… in handle_variation_selector_cluster()
241 set_glyph (buffer->cur(), font); in handle_variation_selector_cluster()
242 buffer->next_glyph (); in handle_variation_selector_cluster()
245 set_glyph (buffer->cur(), font); in handle_variation_selector_cluster()
246 buffer->next_glyph (); in handle_variation_selector_cluster()
249 if (likely (buffer->idx < end)) { in handle_variation_selector_cluster()
250 set_glyph (buffer->cur(), font); in handle_variation_selector_cluster()
251 buffer->next_glyph (); in handle_variation_selector_cluster()
258 hb_buffer_t * const buffer = c->buffer; in decompose_multi_char_cluster() local
259 for (unsigned int i = buffer->idx; i < end && buffer->successful; i++) in decompose_multi_char_cluster()
260 if (unlikely (buffer->unicode->is_variation_selector (buffer->info[i].codepoint))) { in decompose_multi_char_cluster()
265 while (buffer->idx < end && buffer->successful) in decompose_multi_char_cluster()
282 hb_buffer_t *buffer, in _hb_ot_shape_normalize() argument
285 if (unlikely (!buffer->len)) return; in _hb_ot_shape_normalize()
287 _hb_buffer_assert_unicode_vars (buffer); in _hb_ot_shape_normalize()
302 buffer, in _hb_ot_shape_normalize()
304 buffer->unicode, in _hb_ot_shape_normalize()
326 buffer->clear_output (); in _hb_ot_shape_normalize()
327 count = buffer->len; in _hb_ot_shape_normalize()
328 buffer->idx = 0; in _hb_ot_shape_normalize()
332 for (end = buffer->idx + 1; end < count; end++) in _hb_ot_shape_normalize()
333 …if (unlikely (HB_UNICODE_GENERAL_CATEGORY_IS_MARK (_hb_glyph_info_get_general_category (&buffer->i… in _hb_ot_shape_normalize()
342 unsigned int done = font->get_nominal_glyphs (end - buffer->idx, in _hb_ot_shape_normalize()
343 &buffer->cur().codepoint, in _hb_ot_shape_normalize()
344 sizeof (buffer->info[0]), in _hb_ot_shape_normalize()
345 &buffer->cur().glyph_index(), in _hb_ot_shape_normalize()
346 sizeof (buffer->info[0])); in _hb_ot_shape_normalize()
347 buffer->next_glyphs (done); in _hb_ot_shape_normalize()
349 while (buffer->idx < end && buffer->successful) in _hb_ot_shape_normalize()
352 if (buffer->idx == count || !buffer->successful) in _hb_ot_shape_normalize()
358 for (end = buffer->idx + 1; end < count; end++) in _hb_ot_shape_normalize()
359 …if (!HB_UNICODE_GENERAL_CATEGORY_IS_MARK (_hb_glyph_info_get_general_category (&buffer->info[end])… in _hb_ot_shape_normalize()
365 while (buffer->idx < count && buffer->successful); in _hb_ot_shape_normalize()
366 buffer->swap_buffers (); in _hb_ot_shape_normalize()
374 count = buffer->len; in _hb_ot_shape_normalize()
377 if (_hb_glyph_info_get_modified_combining_class (&buffer->info[i]) == 0) in _hb_ot_shape_normalize()
382 if (_hb_glyph_info_get_modified_combining_class (&buffer->info[end]) == 0) in _hb_ot_shape_normalize()
391 buffer->sort (i, end, compare_combining_class); in _hb_ot_shape_normalize()
394 plan->shaper->reorder_marks (plan, buffer, i, end); in _hb_ot_shape_normalize()
399 if (buffer->scratch_flags & HB_BUFFER_SCRATCH_FLAG_HAS_CGJ) in _hb_ot_shape_normalize()
405 for (unsigned int i = 1; i + 1 < buffer->len; i++) in _hb_ot_shape_normalize()
406 if (buffer->info[i].codepoint == 0x034Fu/*CGJ*/ && in _hb_ot_shape_normalize()
407 info_cc(buffer->info[i-1]) <= info_cc(buffer->info[i+1])) in _hb_ot_shape_normalize()
409 _hb_glyph_info_unhide (&buffer->info[i]); in _hb_ot_shape_normalize()
423 buffer->clear_output (); in _hb_ot_shape_normalize()
424 count = buffer->len; in _hb_ot_shape_normalize()
426 buffer->next_glyph (); in _hb_ot_shape_normalize()
427 while (buffer->idx < count && buffer->successful) in _hb_ot_shape_normalize()
434 HB_UNICODE_GENERAL_CATEGORY_IS_MARK (_hb_glyph_info_get_general_category (&buffer->cur()))) in _hb_ot_shape_normalize()
438 (starter == buffer->out_len - 1 || in _hb_ot_shape_normalize()
439 info_cc (buffer->prev()) < info_cc (buffer->cur())) && in _hb_ot_shape_normalize()
442 buffer->out_info[starter].codepoint, in _hb_ot_shape_normalize()
443 buffer->cur().codepoint, in _hb_ot_shape_normalize()
449 buffer->next_glyph (); /* Copy to out-buffer. */ in _hb_ot_shape_normalize()
450 if (unlikely (!buffer->successful)) in _hb_ot_shape_normalize()
452 buffer->merge_out_clusters (starter, buffer->out_len); in _hb_ot_shape_normalize()
453 buffer->out_len--; /* Remove the second composable. */ in _hb_ot_shape_normalize()
455 buffer->out_info[starter].codepoint = composed; in _hb_ot_shape_normalize()
456 buffer->out_info[starter].glyph_index() = glyph; in _hb_ot_shape_normalize()
457 _hb_glyph_info_set_unicode_props (&buffer->out_info[starter], buffer); in _hb_ot_shape_normalize()
464 buffer->next_glyph (); in _hb_ot_shape_normalize()
466 if (info_cc (buffer->prev()) == 0) in _hb_ot_shape_normalize()
467 starter = buffer->out_len - 1; in _hb_ot_shape_normalize()
469 buffer->swap_buffers (); in _hb_ot_shape_normalize()