From bc80e4b9231ccb90746cebde24a7f24653b5a45a Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sun, 24 Jul 2022 18:48:38 -0600 Subject: [PATCH] [GSUB/GPOS] More buffer message for contextuals Fixes https://github.com/harfbuzz/harfbuzz/issues/3753 --- src/hb-ot-layout-gsubgpos.hh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/hb-ot-layout-gsubgpos.hh b/src/hb-ot-layout-gsubgpos.hh index 5acd228b8..81075d6a3 100644 --- a/src/hb-ot-layout-gsubgpos.hh +++ b/src/hb-ot-layout-gsubgpos.hh @@ -1602,9 +1602,29 @@ static inline void apply_lookup (hb_ot_apply_context_t *c, if (unlikely (buffer->max_ops <= 0)) break; + if (HB_BUFFER_MESSAGE_MORE && c->buffer->messaging ()) + { + if (buffer->have_output) + c->buffer->sync_so_far (); + c->buffer->message (c->font, + "recursing to lookup %u at %d", + (unsigned) lookupRecord[i].lookupListIndex, + buffer->idx); + } + if (!c->recurse (lookupRecord[i].lookupListIndex)) continue; + if (HB_BUFFER_MESSAGE_MORE && c->buffer->messaging ()) + { + if (buffer->have_output) + c->buffer->sync_so_far (); + c->buffer->message (c->font, + "recursed to lookup %u at %d", + (unsigned) lookupRecord[i].lookupListIndex, + buffer->idx); + } + unsigned int new_len = buffer->backtrack_len () + buffer->lookahead_len (); int delta = new_len - orig_len;