提交 893991fc 编写于 作者: B Behdad Esfahbod

Initialize set digests

We were not initializing the digests properly and as a result they were
being initialized to zero, making digest1 to never do any useful work.

Speeds up Amiri shaping significantly.
上级 4d2813d3
......@@ -70,9 +70,15 @@ _hb_ot_layout_create (hb_face_t *face)
}
for (unsigned int i = 0; i < layout->gsub_lookup_count; i++)
{
layout->gsub_digests[i].init ();
layout->gsub->get_lookup (i).add_coverage (&layout->gsub_digests[i]);
}
for (unsigned int i = 0; i < layout->gpos_lookup_count; i++)
{
layout->gpos_digests[i].init ();
layout->gpos->get_lookup (i).add_coverage (&layout->gpos_digests[i]);
}
return layout;
}
......
......@@ -212,7 +212,9 @@ arabic_fallback_plan_create (const hb_ot_shape_plan_t *plan,
if (unlikely (!fallback_plan))
return const_cast<arabic_fallback_plan_t *> (&arabic_fallback_plan_nil);
for (unsigned int i = 0; i < ARABIC_NUM_FALLBACK_FEATURES; i++) {
for (unsigned int i = 0; i < ARABIC_NUM_FALLBACK_FEATURES; i++)
{
fallback_plan->digest_array[i].init ();
fallback_plan->mask_array[i] = plan->map.get_1_mask (arabic_fallback_features[i]);
if (fallback_plan->mask_array[i]) {
fallback_plan->lookup_array[i] = arabic_fallback_synthesize_lookup (plan, font, i);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册