Lines Matching refs:buffer

98 output_char (hb_buffer_t *buffer, hb_codepoint_t unichar, hb_codepoint_t glyph)
100 buffer->cur().glyph_index() = glyph;
101 buffer->output_glyph (unichar); /* This is very confusing indeed. */
102 _hb_glyph_info_set_unicode_props (&buffer->prev(), buffer);
106 next_char (hb_buffer_t *buffer, hb_codepoint_t glyph)
108 buffer->cur().glyph_index() = glyph;
109 buffer->next_glyph ();
113 skip_char (hb_buffer_t *buffer)
115 buffer->skip_glyph ();
123 hb_buffer_t * const buffer = c->buffer;
133 output_char (buffer, a, a_glyph);
135 output_char (buffer, b, b_glyph);
144 output_char (buffer, b, b_glyph);
151 output_char (buffer, a, a_glyph);
153 output_char (buffer, b, b_glyph);
165 hb_buffer_t * const buffer = c->buffer;
166 hb_codepoint_t u = buffer->cur().codepoint;
171 next_char (buffer, glyph);
177 skip_char (buffer);
183 next_char (buffer, glyph);
187 if (_hb_glyph_info_is_unicode_space (&buffer->cur()))
190 hb_unicode_funcs_t::space_t space_type = buffer->unicode->space_fallback_type (u);
193 _hb_glyph_info_set_unicode_space_fallback_type (&buffer->cur(), space_type);
194 next_char (buffer, space_glyph);
195 buffer->scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_SPACE_FALLBACK;
207 next_char (buffer, other_glyph);
212 next_char (buffer, glyph); /* glyph is initialized in earlier branches. */
219 hb_buffer_t * const buffer = c->buffer;
221 for (; buffer->idx < end - 1 && !buffer->in_error;) {
222 if (unlikely (buffer->unicode->is_variation_selector (buffer->cur(+1).codepoint))) {
224 if (font->get_variation_glyph (buffer->cur().codepoint, buffer->cur(+1).codepoint, &buffer->cur().glyph_index()))
226 buffer->replace_glyphs (2, 1, &buffer->cur().codepoint);
231 set_glyph (buffer->cur(), font);
232 buffer->next_glyph ();
233 set_glyph (buffer->cur(), font);
234 buffer->next_glyph ();
237 while (buffer->idx < end && unlikely (buffer->unicode->is_variation_selector (buffer->cur().codepoint)))
239 set_glyph (buffer->cur(), font);
240 buffer->next_glyph ();
243 set_glyph (buffer->cur(), font);
244 buffer->next_glyph ();
247 if (likely (buffer->idx < end)) {
248 set_glyph (buffer->cur(), font);
249 buffer->next_glyph ();
256 hb_buffer_t * const buffer = c->buffer;
257 for (unsigned int i = buffer->idx; i < end && !buffer->in_error; i++)
258 if (unlikely (buffer->unicode->is_variation_selector (buffer->info[i].codepoint))) {
263 while (buffer->idx < end && !buffer->in_error)
270 if (likely (c->buffer->idx + 1 == end))
289 hb_buffer_t *buffer,
292 if (unlikely (!buffer->len)) return;
294 _hb_buffer_assert_unicode_vars (buffer);
299 buffer,
301 buffer->unicode,
314 * this makes two buffer swaps. We can make it faster by moving the last
321 buffer->clear_output ();
322 count = buffer->len;
323 for (buffer->idx = 0; buffer->idx < count && !buffer->in_error;)
326 for (end = buffer->idx + 1; end < count; end++)
327 if (likely (!HB_UNICODE_GENERAL_CATEGORY_IS_MARK (_hb_glyph_info_get_general_category (&buffer->info[end]))))
332 buffer->swap_buffers ();
337 count = buffer->len;
340 if (_hb_glyph_info_get_modified_combining_class (&buffer->info[i]) == 0)
345 if (_hb_glyph_info_get_modified_combining_class (&buffer->info[end]) == 0)
354 buffer->sort (i, end, compare_combining_class);
369 buffer->clear_output ();
370 count = buffer->len;
372 buffer->next_glyph ();
373 while (buffer->idx < count && !buffer->in_error)
380 HB_UNICODE_GENERAL_CATEGORY_IS_MARK (_hb_glyph_info_get_general_category (&buffer->cur())) &&
383 (starter == buffer->out_len - 1 ||
384 _hb_glyph_info_get_modified_combining_class (&buffer->prev()) < _hb_glyph_info_get_modified_combining_class (&buffer->cur())) &&
387 buffer->out_info[starter].codepoint,
388 buffer->cur().codepoint,
394 buffer->next_glyph (); /* Copy to out-buffer. */
395 if (unlikely (buffer->in_error))
397 buffer->merge_out_clusters (starter, buffer->out_len);
398 buffer->out_len--; /* Remove the second composable. */
400 buffer->out_info[starter].codepoint = composed;
401 buffer->out_info[starter].glyph_index() = glyph;
402 _hb_glyph_info_set_unicode_props (&buffer->out_info[starter], buffer);
408 buffer->next_glyph ();
410 if (_hb_glyph_info_get_modified_combining_class (&buffer->prev()) == 0)
411 starter = buffer->out_len - 1;
413 buffer->swap_buffers ();