From e8cce9d1b3211550b584728c2c5b9a4a6d9efb09 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 5 Jul 2022 14:05:43 -0600 Subject: [PATCH] [>64k:layout] Add SmallTypes & MediumTypes --- src/hb-ot-layout-common.hh | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/src/hb-ot-layout-common.hh b/src/hb-ot-layout-common.hh index 8fe4c99a7..aef376874 100644 --- a/src/hb-ot-layout-common.hh +++ b/src/hb-ot-layout-common.hh @@ -80,8 +80,34 @@ namespace OT { -#define NOT_COVERED ((unsigned int) -1) +struct SmallTypes { + static constexpr unsigned size = 2; + using HBUINT = HBUINT16; + using HBGlyphID = HBGlyphID16; + using Offset = Offset16; + template + using OffsetTo = OT::Offset16To; + template + using ArrayOf = OT::Array16Of; + template + using SortedArrayOf = OT::SortedArray16Of; +}; +struct MediumTypes { + static constexpr unsigned size = 3; + using HBUINT = HBUINT24; + using HBGlyphID = HBGlyphID24; + using Offset = Offset24; + template + using OffsetTo = OT::Offset24To; + template + using ArrayOf = OT::Array24Of; + template + using SortedArrayOf = OT::SortedArray24Of; +}; + + +#define NOT_COVERED ((unsigned int) -1) template static inline void Coverage_serialize (hb_serialize_context_t *c,