From ae9a5834df477006686421d494b55a1569789327 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 17 Oct 2013 12:24:55 +0200 Subject: [PATCH] [indic] Fix pref vs blwf interaction If a glyph can be both blwf and pref, we were wrongly sorting it in the post position instead of below position. --- src/hb-ot-shape-complex-indic.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc index 07f231bc..75d4cad5 100644 --- a/src/hb-ot-shape-complex-indic.cc +++ b/src/hb-ot-shape-complex-indic.cc @@ -581,15 +581,15 @@ consonant_position_from_face (const indic_shape_plan_t *indic_plan, * to work. */ bool zero_context = indic_plan->is_old_spec ? false : true; hb_codepoint_t glyphs_r[2] = {glyphs[1], glyphs[0]}; - if (indic_plan->pref.would_substitute (glyphs , 2, zero_context, face) || - indic_plan->pref.would_substitute (glyphs_r, 2, zero_context, face)) - return POS_POST_C; if (indic_plan->blwf.would_substitute (glyphs , 2, zero_context, face) || indic_plan->blwf.would_substitute (glyphs_r, 2, zero_context, face)) return POS_BELOW_C; if (indic_plan->pstf.would_substitute (glyphs , 2, zero_context, face) || indic_plan->pstf.would_substitute (glyphs_r, 2, zero_context, face)) return POS_POST_C; + if (indic_plan->pref.would_substitute (glyphs , 2, zero_context, face) || + indic_plan->pref.would_substitute (glyphs_r, 2, zero_context, face)) + return POS_POST_C; return POS_BASE_C; } -- GitLab