[OTLayout] Return correct value from recursion Commit 4c4e8f0e754b79ac6190d21878eaaf0b790c7579 broke contextual lookups by making the recurse() function always return false. Reported by Khaled. Test case: لا in Amiri.
diff --git a/src/hb-ot-layout-gsubgpos-private.hh b/src/hb-ot-layout-gsubgpos-private.hh index 40e8aa9..fe4dcbc 100644 --- a/src/hb-ot-layout-gsubgpos-private.hh +++ b/src/hb-ot-layout-gsubgpos-private.hh
@@ -71,7 +71,7 @@ nesting_level_left--; recurse_func (this, lookup_index); nesting_level_left++; - return default_return_value (); + return VOID; } hb_face_t *face; @@ -112,7 +112,6 @@ inline return_t process (const T &obj) { return obj.would_apply (this); } static return_t default_return_value (void) { return false; } bool stop_sublookup_iteration (const return_t r) const { return r; } - return_t recurse (unsigned int lookup_index) { return true; } hb_face_t *face; const hb_codepoint_t *glyphs; @@ -162,7 +161,7 @@ hb_collect_glyphs_context_t new_c (this->face, NULL, NULL, NULL, &output, nesting_level_left); recurse_func (&new_c, lookup_index); nesting_level_left++; - return default_return_value (); + return VOID; } hb_face_t *face; @@ -236,9 +235,9 @@ return default_return_value (); nesting_level_left--; - recurse_func (this, lookup_index); + bool ret = recurse_func (this, lookup_index); nesting_level_left++; - return default_return_value (); + return ret; } hb_font_t *font;