Home | History | Annotate | Download | only in src

Lines Matching refs:buffer

215   hb_buffer_t  *buffer;
231 hb_set_unicode_props (hb_buffer_t *buffer)
233 unsigned int count = buffer->len;
235 _hb_glyph_info_set_unicode_props (&buffer->info[i], buffer->unicode);
239 hb_insert_dotted_circle (hb_buffer_t *buffer, hb_font_t *font)
241 if (!(buffer->flags & HB_BUFFER_FLAG_BOT) ||
242 _hb_glyph_info_get_general_category (&buffer->info[0]) !=
252 _hb_glyph_info_set_unicode_props (&dottedcircle, buffer->unicode);
254 buffer->clear_output ();
256 buffer->idx = 0;
258 info.cluster = buffer->cur().cluster;
259 info.mask = buffer->cur().mask;
260 buffer->output_info (info);
261 while (buffer->idx < buffer->len)
262 buffer->next_glyph ();
264 buffer->swap_buffers ();
268 hb_form_clusters (hb_buffer_t *buffer)
270 unsigned int count = buffer->len;
272 if (HB_UNICODE_GENERAL_CATEGORY_IS_MARK (_hb_glyph_info_get_general_category (&buffer->info[i])))
273 buffer->merge_clusters (i - 1, i + 1);
277 hb_ensure_native_direction (hb_buffer_t *buffer)
279 hb_direction_t direction = buffer->props.direction;
285 if ((HB_DIRECTION_IS_HORIZONTAL (direction) && direction != hb_script_get_horizontal_direction (buffer->props.script)) ||
288 hb_buffer_reverse_clusters (buffer);
289 buffer->props.direction = HB_DIRECTION_REVERSE (buffer->props.direction);
302 hb_unicode_funcs_t *unicode = c->buffer->unicode;
305 unsigned int count = c->buffer->len;
307 hb_codepoint_t codepoint = unicode->mirroring (c->buffer->info[i].codepoint);
308 if (likely (codepoint == c->buffer->info[i].codepoint))
309 c->buffer->info[i].mask |= rtlm_mask;
311 c->buffer->info[i].codepoint = codepoint;
321 c->buffer->reset_masks (global_mask);
324 c->plan->shaper->setup_masks (c->plan, c->buffer, c->font);
332 c->buffer->set_masks (feature->value << shift, mask, feature->start, feature->end);
338 hb_ot_map_glyphs_fast (hb_buffer_t *buffer)
341 unsigned int count = buffer->len;
343 buffer->info[i].codepoint = buffer->info[i].glyph_index();
349 unsigned int count = c->buffer->len;
351 c->buffer->info[i].glyph_props() = _hb_glyph_info_get_general_category (&c->buffer->info[i]) == HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK ?
360 c->plan->shaper->preprocess_text (c->plan, c->buffer, c->font);
364 HB_BUFFER_ALLOCATE_VAR (c->buffer, glyph_index);
366 _hb_ot_shape_normalize (c->plan, c->buffer, c->font);
372 _hb_ot_shape_fallback_position_recategorize_marks (c->plan, c->font, c->buffer);
374 hb_ot_map_glyphs_fast (c->buffer);
376 HB_BUFFER_DEALLOCATE_VAR (c->buffer, glyph_index);
382 hb_ot_layout_substitute_start (c->font, c->buffer);
387 c->plan->substitute (c->font, c->buffer);
389 hb_ot_layout_substitute_finish (c->font, c->buffer);
406 hb_ot_layout_position_start (c->font, c->buffer);
408 unsigned int count = c->buffer->len;
411 c->font->get_glyph_advance_for_direction (c->buffer->info[i].codepoint,
412 c->buffer->props.direction,
413 &c->buffer->pos[i].x_advance,
414 &c->buffer->pos[i].y_advance);
415 c->font->subtract_glyph_origin_for_direction (c->buffer->info[i].codepoint,
416 c->buffer->props.direction,
417 &c->buffer->pos[i].x_offset,
418 &c->buffer->pos[i].y_offset);
428 if ((c->buffer->info[i].glyph_props() & HB_OT_LAYOUT_GLYPH_PROPS_MARK))
430 c->buffer->pos[i].x_advance = 0;
431 c->buffer->pos[i].y_advance = 0;
446 unsigned int count = c->buffer->len;
453 c->font->add_glyph_origin_for_direction (c->buffer->info[i].codepoint,
455 &c->buffer->pos[i].x_offset,
456 &c->buffer->pos[i].y_offset);
459 c->plan->position (c->font, c->buffer);
462 c->font->subtract_glyph_origin_for_direction (c->buffer->info[i].codepoint,
464 &c->buffer->pos[i].x_offset,
465 &c->buffer->pos[i].y_offset);
477 if (_hb_glyph_info_get_general_category (&c->buffer->info[i]) == HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK)
479 c->buffer->pos[i].x_advance = 0;
480 c->buffer->pos[i].y_advance = 0;
490 hb_ot_layout_position_finish (c->font, c->buffer);
503 _hb_ot_shape_fallback_position (c->plan, c->font, c->buffer);
505 if (HB_DIRECTION_IS_BACKWARD (c->buffer->props.direction))
506 hb_buffer_reverse (c->buffer);
511 _hb_ot_shape_fallback_kern (c->plan, c->font, c->buffer);
520 if (c->buffer->flags & HB_BUFFER_FLAG_PRESERVE_DEFAULT_IGNORABLES)
525 unsigned int count = c->buffer->len;
527 if (unlikely (!is_a_ligature (c->buffer->info[i]) &&
528 _hb_glyph_info_is_default_ignorable (&c->buffer->info[i])))
535 c->buffer->info[i].codepoint = space;
536 c->buffer->pos[i].x_advance = 0;
537 c->buffer->pos[i].y_advance = 0;
547 c->buffer->deallocate_var_all ();
550 c->target_direction = c->buffer->props.direction;
552 HB_BUFFER_ALLOCATE_VAR (c->buffer, unicode_props0);
553 HB_BUFFER_ALLOCATE_VAR (c->buffer, unicode_props1);
555 c->buffer->clear_output ();
557 hb_set_unicode_props (c->buffer);
558 hb_insert_dotted_circle (c->buffer, c->font);
559 hb_form_clusters (c->buffer);
561 hb_ensure_native_direction (c->buffer);
568 HB_BUFFER_DEALLOCATE_VAR (c->buffer, unicode_props1);
569 HB_BUFFER_DEALLOCATE_VAR (c->buffer, unicode_props0);
571 c->buffer->props.direction = c->target_direction;
573 c->buffer->deallocate_var_all ();
580 hb_buffer_t *buffer,
584 hb_ot_shape_context_t c = {HB_SHAPER_DATA_GET (shape_plan), font, font->face, buffer, features, num_features};
623 hb_buffer_t *buffer,
631 hb_shape_plan_t *shape_plan = hb_shape_plan_create_cached (font->face, &buffer->props,
634 bool mirror = hb_script_get_horizontal_direction (buffer->props.script) == HB_DIRECTION_RTL;
636 unsigned int count = buffer->len;
638 add_char (font, buffer->unicode, mirror, buffer->info[i].codepoint, glyphs);