[OTLayout] Don't recurse in collect_glyphs() for GPOS
This commit is contained in:
parent
b5e04c7dc6
commit
1bcfa06d11
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user