Skip to content

Commit

Permalink
Bug 1762183 - Cherry-pick some upstream HarfBuzz fixes to address rec…
Browse files Browse the repository at this point in the history
…ent regressions. r=jfkthame

Fixes:
harfbuzz/harfbuzz#3512
harfbuzz/harfbuzz#3513

Differential Revision: https://phabricator.services.mozilla.com/D142454
  • Loading branch information
rvandermeulen committed Mar 30, 2022
1 parent 7967594 commit 3bbd35f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
3 changes: 2 additions & 1 deletion gfx/harfbuzz/src/hb-ot-shape-complex-indic.cc
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,11 @@ collect_features_indic (hb_ot_shape_planner_t *plan)
}

map->add_gsub_pause (final_reordering_indic);
map->add_gsub_pause (_hb_clear_syllables);

for (; i < INDIC_NUM_FEATURES; i++)
map->add_feature (indic_features[i]);

map->add_gsub_pause (_hb_clear_syllables);
}

static void
Expand Down
10 changes: 8 additions & 2 deletions gfx/harfbuzz/src/hb-ot-shape.cc
Original file line number Diff line number Diff line change
Expand Up @@ -935,17 +935,23 @@ hb_ot_substitute_pre (const hb_ot_shape_context_t *c)
_hb_buffer_allocate_gsubgpos_vars (c->buffer);

hb_ot_substitute_complex (c);

#ifndef HB_NO_AAT_SHAPE
if (c->plan->apply_morx && c->plan->apply_gpos)
hb_aat_layout_remove_deleted_glyphs (c->buffer);
#endif
}

static inline void
hb_ot_substitute_post (const hb_ot_shape_context_t *c)
{
hb_ot_hide_default_ignorables (c->buffer, c->font);
#ifndef HB_NO_AAT_SHAPE
if (c->plan->apply_morx)
if (c->plan->apply_morx && !c->plan->apply_gpos)
hb_aat_layout_remove_deleted_glyphs (c->buffer);
#endif

hb_ot_hide_default_ignorables (c->buffer, c->font);

if (c->plan->shaper->postprocess_glyphs &&
c->buffer->message(c->font, "start postprocess-glyphs")) {
c->plan->shaper->postprocess_glyphs (c->plan, c->buffer, c->font);
Expand Down

0 comments on commit 3bbd35f

Please sign in to comment.