From 70e2de2bd440bccbb5e896ca1a08202da7ed0b4d Mon Sep 17 00:00:00 2001 From: Garret Rieger Date: Fri, 21 Oct 2022 22:33:17 +0000 Subject: [PATCH] [subset] Always output Lookup's even if they are empty. The rest of layout subsetting depends on lookup indices being consistent with those computed during planning. So if an empty lookup is discarded during the subset phase it will invalidate all subsequent lookup indices. Generally we shouldn't end up with an empty lookup as we pre-prune them during the planning phase, but it can happen in rare cases such as when a subtable is considered degenerate (eg. #3853) --- src/hb-ot-layout-common.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hb-ot-layout-common.hh b/src/hb-ot-layout-common.hh index 91c55f788..40de365b5 100644 --- a/src/hb-ot-layout-common.hh +++ b/src/hb-ot-layout-common.hh @@ -1388,7 +1388,7 @@ struct Lookup outMarkFilteringSet = markFilteringSet; } - return_trace (out->subTable.len); + return true; } template @@ -2948,7 +2948,7 @@ struct ConditionSet // all conditions met if (num_kept_cond == 0) return DROP_COND_WITH_VAR; - + //check if condition_set is unique with variations if (c->conditionset_map->has (p)) //duplicate found, drop the entire record