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

Only do fallback Hebrew composition if no GPOS 'mark' available

Apparently some modern fonts have proper GPOS mark positioning
tables, but undesirable precomposed forms!  See thread
"Hebrew composition to presentation forms" and:

  http://tex.stackexchange.com/questions/156775/having-trouble-with-vowel-positioning-in-ezra-sil-xelatex

Test case: U+fb1d,05d9,05b4
上级 b456d42b
......@@ -70,7 +70,7 @@ compose_hebrew (const hb_ot_shape_normalize_context_t *c,
bool found = c->unicode->compose (a, b, ab);
if (!found)
if (!found && !c->plan->has_mark)
{
/* Special-case Hebrew presentation forms that are excluded from
* standard normalization, but wanted for old fonts. */
......
......@@ -44,6 +44,7 @@ struct hb_ot_shape_plan_t
hb_mask_t kern_mask;
unsigned int has_frac : 1;
unsigned int has_kern : 1;
unsigned int has_mark : 1;
inline void collect_lookups (hb_tag_t table_tag, hb_set_t *lookups) const
{
......@@ -92,6 +93,7 @@ struct hb_ot_shape_planner_t
plan.has_frac = plan.frac_mask || (plan.numr_mask && plan.dnom_mask);
plan.has_kern = !!plan.kern_mask;
plan.has_mark = !!plan.map.get_1_mask (HB_TAG ('m','a','r','k'));
}
private:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册