提交 1bcfa06d 编写于 作者: B Behdad Esfahbod

[OTLayout] Don't recurse in collect_glyphs() for GPOS

上级 b5e04c7d
......@@ -1446,7 +1446,7 @@ struct PosLookup : Lookup
inline hb_collect_glyphs_context_t::return_t collect_glyphs_lookup (hb_collect_glyphs_context_t *c) const
{
TRACE_COLLECT_GLYPHS (this);
c->set_recurse_func (process_recurse_func<hb_collect_glyphs_context_t>);
c->set_recurse_func (NULL);
return TRACE_RETURN (process (c));
}
......
......@@ -156,6 +156,10 @@ struct hb_collect_glyphs_context_t
if (unlikely (nesting_level_left == 0 || !recurse_func))
return default_return_value ();
/* Note that GPOS sets recurse_func to NULL already, so it doesn't get
* past the previous check. For GSUB, we only want to collect the output
* glyphs in the recursion. If those are not requested, we can go home now. */
nesting_level_left--;
/* Only collect output glyphs in the recursion. */
hb_collect_glyphs_context_t new_c (this->face, NULL, NULL, NULL, &output, nesting_level_left);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册