[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:
parent
c7dacac02c
commit
ae9a5834df
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue