Lines Matching refs:buffer

210   hb_buffer_t  *buffer;  member
226 hb_set_unicode_props (hb_buffer_t *buffer) in hb_set_unicode_props() argument
228 unsigned int count = buffer->len; in hb_set_unicode_props()
229 hb_glyph_info_t *info = buffer->info; in hb_set_unicode_props()
231 _hb_glyph_info_set_unicode_props (&info[i], buffer); in hb_set_unicode_props()
235 hb_insert_dotted_circle (hb_buffer_t *buffer, hb_font_t *font) in hb_insert_dotted_circle() argument
237 if (!(buffer->flags & HB_BUFFER_FLAG_BOT) || in hb_insert_dotted_circle()
238 buffer->context_len[0] || in hb_insert_dotted_circle()
239 _hb_glyph_info_get_general_category (&buffer->info[0]) != in hb_insert_dotted_circle()
248 _hb_glyph_info_set_unicode_props (&dottedcircle, buffer); in hb_insert_dotted_circle()
250 buffer->clear_output (); in hb_insert_dotted_circle()
252 buffer->idx = 0; in hb_insert_dotted_circle()
254 info.cluster = buffer->cur().cluster; in hb_insert_dotted_circle()
255 info.mask = buffer->cur().mask; in hb_insert_dotted_circle()
256 buffer->output_info (info); in hb_insert_dotted_circle()
257 while (buffer->idx < buffer->len && !buffer->in_error) in hb_insert_dotted_circle()
258 buffer->next_glyph (); in hb_insert_dotted_circle()
260 buffer->swap_buffers (); in hb_insert_dotted_circle()
264 hb_form_clusters (hb_buffer_t *buffer) in hb_form_clusters() argument
266 if (!(buffer->scratch_flags & HB_BUFFER_SCRATCH_FLAG_HAS_NON_ASCII) || in hb_form_clusters()
267 buffer->cluster_level != HB_BUFFER_CLUSTER_LEVEL_MONOTONE_GRAPHEMES) in hb_form_clusters()
272 unsigned int count = buffer->len; in hb_form_clusters()
273 hb_glyph_info_t *info = buffer->info; in hb_form_clusters()
279 buffer->merge_clusters (base, i); in hb_form_clusters()
283 buffer->merge_clusters (base, count); in hb_form_clusters()
287 hb_ensure_native_direction (hb_buffer_t *buffer) in hb_ensure_native_direction() argument
289 hb_direction_t direction = buffer->props.direction; in hb_ensure_native_direction()
295 …ORIZONTAL (direction) && direction != hb_script_get_horizontal_direction (buffer->props.script)) || in hb_ensure_native_direction()
301 unsigned int count = buffer->len; in hb_ensure_native_direction()
302 hb_glyph_info_t *info = buffer->info; in hb_ensure_native_direction()
307 if (buffer->cluster_level == HB_BUFFER_CLUSTER_LEVEL_MONOTONE_CHARACTERS) in hb_ensure_native_direction()
308 buffer->merge_clusters (base, i); in hb_ensure_native_direction()
309 buffer->reverse_range (base, i); in hb_ensure_native_direction()
314 if (buffer->cluster_level == HB_BUFFER_CLUSTER_LEVEL_MONOTONE_CHARACTERS) in hb_ensure_native_direction()
315 buffer->merge_clusters (base, count); in hb_ensure_native_direction()
316 buffer->reverse_range (base, count); in hb_ensure_native_direction()
318 buffer->reverse (); in hb_ensure_native_direction()
320 buffer->props.direction = HB_DIRECTION_REVERSE (buffer->props.direction); in hb_ensure_native_direction()
333 hb_buffer_t *buffer = c->buffer; in hb_ot_mirror_chars() local
334 hb_unicode_funcs_t *unicode = buffer->unicode; in hb_ot_mirror_chars()
337 unsigned int count = buffer->len; in hb_ot_mirror_chars()
338 hb_glyph_info_t *info = buffer->info; in hb_ot_mirror_chars()
351 if (!(c->buffer->scratch_flags & HB_BUFFER_SCRATCH_FLAG_HAS_NON_ASCII) || in hb_ot_shape_setup_masks_fraction()
355 hb_buffer_t *buffer = c->buffer; in hb_ot_shape_setup_masks_fraction() local
358 unsigned int count = buffer->len; in hb_ot_shape_setup_masks_fraction()
359 hb_glyph_info_t *info = buffer->info; in hb_ot_shape_setup_masks_fraction()
389 hb_buffer_t *buffer = c->buffer; in hb_ot_shape_initialize_masks() local
392 buffer->reset_masks (global_mask); in hb_ot_shape_initialize_masks()
399 hb_buffer_t *buffer = c->buffer; in hb_ot_shape_setup_masks() local
404 c->plan->shaper->setup_masks (c->plan, buffer, c->font); in hb_ot_shape_setup_masks()
412 buffer->set_masks (feature->value << shift, mask, feature->start, feature->end); in hb_ot_shape_setup_masks()
420 hb_buffer_t *buffer = c->buffer; in hb_ot_zero_width_default_ignorables() local
422 if (!(buffer->scratch_flags & HB_BUFFER_SCRATCH_FLAG_HAS_DEFAULT_IGNORABLES) || in hb_ot_zero_width_default_ignorables()
423 (buffer->flags & HB_BUFFER_FLAG_PRESERVE_DEFAULT_IGNORABLES)) in hb_ot_zero_width_default_ignorables()
426 unsigned int count = buffer->len; in hb_ot_zero_width_default_ignorables()
427 hb_glyph_info_t *info = buffer->info; in hb_ot_zero_width_default_ignorables()
428 hb_glyph_position_t *pos = buffer->pos; in hb_ot_zero_width_default_ignorables()
438 hb_buffer_t *buffer = c->buffer; in hb_ot_hide_default_ignorables() local
440 if (!(buffer->scratch_flags & HB_BUFFER_SCRATCH_FLAG_HAS_DEFAULT_IGNORABLES) || in hb_ot_hide_default_ignorables()
441 (buffer->flags & HB_BUFFER_FLAG_PRESERVE_DEFAULT_IGNORABLES)) in hb_ot_hide_default_ignorables()
444 unsigned int count = buffer->len; in hb_ot_hide_default_ignorables()
445 hb_glyph_info_t *info = buffer->info; in hb_ot_hide_default_ignorables()
446 hb_glyph_position_t *pos = buffer->pos; in hb_ot_hide_default_ignorables()
497 buffer->merge_clusters (i, i + 2); /* Merge cluster forward. */ in hb_ot_hide_default_ignorables()
509 buffer->len = j; in hb_ot_hide_default_ignorables()
515 hb_ot_map_glyphs_fast (hb_buffer_t *buffer) in hb_ot_map_glyphs_fast() argument
518 unsigned int count = buffer->len; in hb_ot_map_glyphs_fast()
519 hb_glyph_info_t *info = buffer->info; in hb_ot_map_glyphs_fast()
523 buffer->content_type = HB_BUFFER_CONTENT_TYPE_GLYPHS; in hb_ot_map_glyphs_fast()
529 hb_buffer_t *buffer = c->buffer; in hb_ot_substitute_default() local
535 HB_BUFFER_ALLOCATE_VAR (buffer, glyph_index); in hb_ot_substitute_default()
537 _hb_ot_shape_normalize (c->plan, buffer, c->font); in hb_ot_substitute_default()
543 _hb_ot_shape_fallback_position_recategorize_marks (c->plan, c->font, buffer); in hb_ot_substitute_default()
545 hb_ot_map_glyphs_fast (buffer); in hb_ot_substitute_default()
547 HB_BUFFER_DEALLOCATE_VAR (buffer, glyph_index); in hb_ot_substitute_default()
553 hb_buffer_t *buffer = c->buffer; in hb_ot_substitute_complex() local
555 hb_ot_layout_substitute_start (c->font, buffer); in hb_ot_substitute_complex()
557 c->plan->substitute (c->font, buffer); in hb_ot_substitute_complex()
567 _hb_buffer_allocate_gsubgpos_vars (c->buffer); in hb_ot_substitute()
589 zero_mark_widths_by_gdef (hb_buffer_t *buffer, bool adjust_offsets) in zero_mark_widths_by_gdef() argument
591 unsigned int count = buffer->len; in zero_mark_widths_by_gdef()
592 hb_glyph_info_t *info = buffer->info; in zero_mark_widths_by_gdef()
597 adjust_mark_offsets (&buffer->pos[i]); in zero_mark_widths_by_gdef()
598 zero_mark_width (&buffer->pos[i]); in zero_mark_widths_by_gdef()
605 hb_direction_t direction = c->buffer->props.direction; in hb_ot_position_default()
606 unsigned int count = c->buffer->len; in hb_ot_position_default()
607 hb_glyph_info_t *info = c->buffer->info; in hb_ot_position_default()
608 hb_glyph_position_t *pos = c->buffer->pos; in hb_ot_position_default()
631 if (c->buffer->scratch_flags & HB_BUFFER_SCRATCH_FLAG_HAS_SPACE_FALLBACK) in hb_ot_position_default()
632 _hb_ot_shape_fallback_spaces (c->plan, c->font, c->buffer); in hb_ot_position_default()
638 hb_ot_layout_position_start (c->font, c->buffer); in hb_ot_position_complex()
641 unsigned int count = c->buffer->len; in hb_ot_position_complex()
654 HB_DIRECTION_IS_BACKWARD (c->buffer->props.direction)); in hb_ot_position_complex()
659 zero_mark_widths_by_gdef (c->buffer, adjust_offsets_when_zeroing); in hb_ot_position_complex()
670 hb_glyph_info_t *info = c->buffer->info; in hb_ot_position_complex()
671 hb_glyph_position_t *pos = c->buffer->pos; in hb_ot_position_complex()
682 c->plan->position (c->font, c->buffer); in hb_ot_position_complex()
697 zero_mark_widths_by_gdef (c->buffer, adjust_offsets_when_zeroing); in hb_ot_position_complex()
707 hb_ot_layout_position_finish_advances (c->font, c->buffer); in hb_ot_position_complex()
709 hb_ot_layout_position_finish_offsets (c->font, c->buffer); in hb_ot_position_complex()
717 c->buffer->clear_positions (); in hb_ot_position()
724 _hb_ot_shape_fallback_position (c->plan, c->font, c->buffer); in hb_ot_position()
726 if (HB_DIRECTION_IS_BACKWARD (c->buffer->props.direction)) in hb_ot_position()
727 hb_buffer_reverse (c->buffer); in hb_ot_position()
732 _hb_ot_shape_fallback_kern (c->plan, c->font, c->buffer); in hb_ot_position()
734 _hb_buffer_deallocate_gsubgpos_vars (c->buffer); in hb_ot_position()
743 c->buffer->deallocate_var_all (); in hb_ot_shape_internal()
744 c->buffer->scratch_flags = HB_BUFFER_SCRATCH_FLAG_DEFAULT; in hb_ot_shape_internal()
745 if (likely (!_hb_unsigned_int_mul_overflows (c->buffer->len, HB_BUFFER_MAX_EXPANSION_FACTOR))) in hb_ot_shape_internal()
747 c->buffer->max_len = MAX (c->buffer->len * HB_BUFFER_MAX_EXPANSION_FACTOR, in hb_ot_shape_internal()
752 c->target_direction = c->buffer->props.direction; in hb_ot_shape_internal()
754 _hb_buffer_allocate_unicode_vars (c->buffer); in hb_ot_shape_internal()
756 c->buffer->clear_output (); in hb_ot_shape_internal()
758 hb_set_unicode_props (c->buffer); in hb_ot_shape_internal()
759 hb_insert_dotted_circle (c->buffer, c->font); in hb_ot_shape_internal()
760 hb_form_clusters (c->buffer); in hb_ot_shape_internal()
762 hb_ensure_native_direction (c->buffer); in hb_ot_shape_internal()
765 c->plan->shaper->preprocess_text (c->plan, c->buffer, c->font); in hb_ot_shape_internal()
773 c->plan->shaper->postprocess_glyphs (c->plan, c->buffer, c->font); in hb_ot_shape_internal()
775 _hb_buffer_deallocate_unicode_vars (c->buffer); in hb_ot_shape_internal()
777 c->buffer->props.direction = c->target_direction; in hb_ot_shape_internal()
779 c->buffer->max_len = HB_BUFFER_MAX_LEN_DEFAULT; in hb_ot_shape_internal()
780 c->buffer->deallocate_var_all (); in hb_ot_shape_internal()
787 hb_buffer_t *buffer, in _hb_ot_shape() argument
791 …hb_ot_shape_context_t c = {HB_SHAPER_DATA_GET (shape_plan), font, font->face, buffer, features, nu… in _hb_ot_shape()
840 hb_buffer_t *buffer, in hb_ot_shape_glyphs_closure() argument
848 hb_shape_plan_t *shape_plan = hb_shape_plan_create_cached (font->face, &buffer->props, in hb_ot_shape_glyphs_closure()
851 bool mirror = hb_script_get_horizontal_direction (buffer->props.script) == HB_DIRECTION_RTL; in hb_ot_shape_glyphs_closure()
853 unsigned int count = buffer->len; in hb_ot_shape_glyphs_closure()
854 hb_glyph_info_t *info = buffer->info; in hb_ot_shape_glyphs_closure()
856 add_char (font, buffer->unicode, mirror, info[i].codepoint, glyphs); in hb_ot_shape_glyphs_closure()