From 795224e1b5bb2f9fc2b888ded978e6b7e71c8ca2 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 1 Oct 2026 13:32:19 -0600 Subject: [PATCH] [layout] Use Offset24 in ChainedSequenceRuleSet2 The extended chained sequence context format uses Offset24 entries in its inner ChainedSequenceRuleSet2 array. Propagate the enclosing format type to that array instead of always selecting the 16-bit offset type. Add a compile-time size check for the medium rule-set header and first offset entry. Testing: meson test -C build Assisted-by: OpenAI Codex --- src/hb-ot-layout-gsubgpos.hh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/hb-ot-layout-gsubgpos.hh b/src/hb-ot-layout-gsubgpos.hh index 280382ca3..cf985a67d 100644 --- a/src/hb-ot-layout-gsubgpos.hh +++ b/src/hb-ot-layout-gsubgpos.hh @@ -5125,7 +5125,10 @@ struct ChainRuleSetOf }; template -struct ChainRuleSet : ChainRuleSetOf> {}; +struct ChainRuleSet : ChainRuleSetOf> {}; + +static_assert (sizeof (ChainRuleSet) == + HBUINT16::static_size + Offset24::static_size, ""); template struct ChainClassRuleSet : ChainRuleSetOf> {};