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

[GSUB] Add GSUB::substitute_lookup()

上级 c43562b2
......@@ -692,6 +692,7 @@ struct ContextSubstFormat1 {
};
ASSERT_SIZE (ContextSubstFormat1, 6);
struct SubClassRule {
/* TODO */
......@@ -1177,6 +1178,12 @@ struct GSUB : GSUBGPOS {
return *(SubstLookup*)&(((GSUBGPOS *)this)->get_lookup (i));
}
inline bool substitute_lookup (hb_ot_layout_t *layout,
hb_buffer_t *buffer,
unsigned int lookup_index,
hb_ot_layout_feature_mask_t mask) const {
return get_lookup (lookup_index).substitute_string (layout, buffer, mask);
}
};
DEFINE_NULL_ALIAS (GSUB, GSUBGPOS);
......
......@@ -529,10 +529,7 @@ hb_ot_layout_substitute_lookup (hb_ot_layout_t *layout,
unsigned int lookup_index,
hb_ot_layout_feature_mask_t mask)
{
const GSUB &gsub = *(layout->gsub);
const SubstLookup &l = gsub.get_lookup (lookup_index);
return l.substitute_string (layout, buffer, mask);
return layout->gsub->substitute_lookup (layout, buffer, lookup_index, mask);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册