diff --git a/src/hb-ot-shaper-arabic-fallback.hh b/src/hb-ot-shaper-arabic-fallback.hh index 8c513be78..8c7d187e0 100644 --- a/src/hb-ot-shaper-arabic-fallback.hh +++ b/src/hb-ot-shaper-arabic-fallback.hh @@ -153,13 +153,16 @@ arabic_fallback_synthesize_lookup_ligature (const hb_ot_shape_plan_t *plan HB_UN const auto &components = ligature_table[first_glyph_idx].ligatures[ligature_idx].components; unsigned component_count = ARRAY_LENGTH_CONST (components); - hb_codepoint_t component_u = ligature_table[first_glyph_idx].ligatures[ligature_idx].components[0]; - hb_codepoint_t component_glyph; - if (!component_u || - !hb_font_get_glyph (font, component_u, 0, &component_glyph)) - continue; + for (unsigned i = 0; i < component_count; i++) + { + hb_codepoint_t component_u = ligature_table[first_glyph_idx].ligatures[ligature_idx].components[i]; + hb_codepoint_t component_glyph; + if (!component_u || + !hb_font_get_glyph (font, component_u, 0, &component_glyph)) + continue; - component_list[num_components++] = component_glyph; + component_list[num_components++] = component_glyph; + } component_count_list[num_ligatures] = 1 + component_count; ligature_list[num_ligatures] = ligature_glyph;