提交 ae9a5834 编写于 作者: B Behdad Esfahbod

[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.
上级 c7dacac0
...@@ -581,15 +581,15 @@ consonant_position_from_face (const indic_shape_plan_t *indic_plan, ...@@ -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;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册