From 661050b4659ee490dfe622821bc7fde7d1c40510 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 6 Feb 2023 12:38:17 -0700 Subject: [PATCH] Revert "[layout] Limit how far we skip when looking back" This reverts commit 85be877925ddbf34f74a1229f3ca1716bb6170dc. --- src/hb-ot-layout-gsubgpos.hh | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/hb-ot-layout-gsubgpos.hh b/src/hb-ot-layout-gsubgpos.hh index 7adf753b8..609c6b689 100644 --- a/src/hb-ot-layout-gsubgpos.hh +++ b/src/hb-ot-layout-gsubgpos.hh @@ -597,13 +597,6 @@ struct hb_ot_apply_context_t : unsigned stop = num_items - 1; if (c->buffer->flags & HB_BUFFER_FLAG_PRODUCE_UNSAFE_TO_CONCAT) stop = 1 - 1; - - /* When looking back, limit how far we search; this function is mostly - * used for looking back for base glyphs when attaching marks. If we - * don't limit, we can get O(n^2) behavior where n is the number of - * consecutive marks. */ - stop = (unsigned) hb_max ((int) stop, (int) idx - HB_MAX_CONTEXT_LENGTH); - while (idx > stop) { idx--;