[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
This commit is contained in:
Behdad Esfahbod committed 2026-10-01 13:32:19 -06:00
1 parent d2e218ac26
commit 795224e1b5
1 file changed
+4 -1
+4 -1
View File
@@ -5125,7 +5125,10 @@ struct ChainRuleSetOf
};
template <typename Types>
struct ChainRuleSet : ChainRuleSetOf<SmallTypes, ChainRule<Types>> {};
struct ChainRuleSet : ChainRuleSetOf<Types, ChainRule<Types>> {};
static_assert (sizeof (ChainRuleSet<MediumTypes>) ==
HBUINT16::static_size + Offset24::static_size, "");
template <typename Types>
struct ChainClassRuleSet : ChainRuleSetOf<Types, ChainRule<SmallTypes>> {};