[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.
This commit is contained in:
Behdad Esfahbod 2013-10-17 12:24:55 +02:00
parent c7dacac02c
commit ae9a5834df
1 changed files with 3 additions and 3 deletions

View File

@ -581,15 +581,15 @@ consonant_position_from_face (const indic_shape_plan_t *indic_plan,
* to work. */ * to work. */
bool zero_context = indic_plan->is_old_spec ? false : true; bool zero_context = indic_plan->is_old_spec ? false : true;
hb_codepoint_t glyphs_r[2] = {glyphs[1], glyphs[0]}; 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) || if (indic_plan->blwf.would_substitute (glyphs , 2, zero_context, face) ||
indic_plan->blwf.would_substitute (glyphs_r, 2, zero_context, face)) indic_plan->blwf.would_substitute (glyphs_r, 2, zero_context, face))
return POS_BELOW_C; return POS_BELOW_C;
if (indic_plan->pstf.would_substitute (glyphs , 2, zero_context, face) || if (indic_plan->pstf.would_substitute (glyphs , 2, zero_context, face) ||
indic_plan->pstf.would_substitute (glyphs_r, 2, zero_context, face)) indic_plan->pstf.would_substitute (glyphs_r, 2, zero_context, face))
return POS_POST_C; 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; return POS_BASE_C;
} }