diff options
Diffstat (limited to 'Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.cc')
-rw-r--r-- | Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.cc | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.cc index 263d65c0ccb..c20b110e216 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.cc +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.cc @@ -180,6 +180,8 @@ _hb_ot_shaper_shape_plan_data_create (hb_shape_plan_t *shape_plan, if (unlikely (!plan)) return nullptr; + plan->init (); + hb_ot_shape_planner_t planner (shape_plan); planner.shaper = hb_ot_shape_complex_categorize (&planner); @@ -204,7 +206,7 @@ _hb_ot_shaper_shape_plan_data_destroy (hb_ot_shaper_shape_plan_data_t *plan) if (plan->shaper->data_destroy) plan->shaper->data_destroy (const_cast<void *> (plan->data)); - plan->finish (); + plan->fini (); free (plan); } @@ -268,7 +270,7 @@ hb_insert_dotted_circle (hb_buffer_t *buffer, hb_font_t *font) info.cluster = buffer->cur().cluster; info.mask = buffer->cur().mask; buffer->output_info (info); - while (buffer->idx < buffer->len && !buffer->in_error) + while (buffer->idx < buffer->len && buffer->successful) buffer->next_glyph (); buffer->swap_buffers (); @@ -306,13 +308,16 @@ static void hb_ensure_native_direction (hb_buffer_t *buffer) { hb_direction_t direction = buffer->props.direction; + hb_direction_t horiz_dir = hb_script_get_horizontal_direction (buffer->props.script); /* TODO vertical: * The only BTT vertical script is Ogham, but it's not clear to me whether OpenType * Ogham fonts are supposed to be implemented BTT or not. Need to research that * first. */ - if ((HB_DIRECTION_IS_HORIZONTAL (direction) && direction != hb_script_get_horizontal_direction (buffer->props.script)) || - (HB_DIRECTION_IS_VERTICAL (direction) && direction != HB_DIRECTION_TTB)) + if ((HB_DIRECTION_IS_HORIZONTAL (direction) && + direction != horiz_dir && horiz_dir != HB_DIRECTION_INVALID) || + (HB_DIRECTION_IS_VERTICAL (direction) && + direction != HB_DIRECTION_TTB)) { /* Same loop as hb_form_clusters(). * Since form_clusters() merged clusters already, we don't merge. */ @@ -939,8 +944,6 @@ hb_ot_shape_glyphs_closure (hb_font_t *font, unsigned int num_features, hb_set_t *glyphs) { - hb_ot_shape_plan_t plan; - const char *shapers[] = {"ot", nullptr}; hb_shape_plan_t *shape_plan = hb_shape_plan_create_cached (font->face, &buffer->props, features, num_features, shapers); |