diff --git a/src/OT/Layout/GPOS/PairPos.hh b/src/OT/Layout/GPOS/PairPos.hh index 2434650d3..72bfc43dc 100644 --- a/src/OT/Layout/GPOS/PairPos.hh +++ b/src/OT/Layout/GPOS/PairPos.hh @@ -16,6 +16,7 @@ struct PairPos PairPosFormat1_3 format1; PairPosFormat2_4 format2; #ifndef HB_NO_BORING_EXPANSION + PairPosFormat1_3 format3; PairPosFormat2_4 format4; #endif } u; @@ -30,7 +31,8 @@ struct PairPos case 1: return_trace (c->dispatch (u.format1, std::forward (ds)...)); case 2: return_trace (c->dispatch (u.format2, std::forward (ds)...)); #ifndef HB_NO_BORING_EXPANSION - case 4: return_trace (c->dispatch (u.format2, std::forward (ds)...)); + case 3: return_trace (c->dispatch (u.format3, std::forward (ds)...)); + case 4: return_trace (c->dispatch (u.format4, std::forward (ds)...)); #endif default:return_trace (c->default_return_value ()); } diff --git a/src/OT/Layout/GPOS/PairPosFormat1.hh b/src/OT/Layout/GPOS/PairPosFormat1.hh index c291b540e..3cb207281 100644 --- a/src/OT/Layout/GPOS/PairPosFormat1.hh +++ b/src/OT/Layout/GPOS/PairPosFormat1.hh @@ -16,7 +16,7 @@ struct PairPosFormat1_3 protected: HBUINT16 format; /* Format identifier--format = 1 */ - Offset16To + typename Types::template OffsetTo coverage; /* Offset to Coverage table--from * beginning of subtable */ ValueFormat valueFormat[2]; /* [0] Defines the types of data in @@ -25,11 +25,11 @@ struct PairPosFormat1_3 /* [1] Defines the types of data in * ValueRecord2--for the second glyph * in the pair--may be zero (0) */ - Array16OfOffset16To + Array16Of> pairSet; /* Array of PairSet tables * ordered by Coverage Index */ public: - DEFINE_SIZE_ARRAY (10, pairSet); + DEFINE_SIZE_ARRAY (8 + Types::size, pairSet); bool sanitize (hb_sanitize_context_t *c) const { @@ -55,7 +55,7 @@ struct PairPosFormat1_3 + hb_zip (this+coverage, pairSet) | hb_filter (*glyphs, hb_first) | hb_map (hb_second) - | hb_map ([glyphs, this] (const Offset16To &_) + | hb_map ([glyphs, this] (const typename Types::template OffsetTo &_) { return (this+_).intersects (glyphs, valueFormat); }) | hb_any ; @@ -131,7 +131,7 @@ struct PairPosFormat1_3 + hb_zip (this+coverage, pairSet) | hb_filter (glyphset, hb_first) - | hb_filter ([this, c, out] (const Offset16To& _) + | hb_filter ([this, c, out] (const typename Types::template OffsetTo& _) { auto snap = c->serializer->snapshot (); auto *o = out->pairSet.serialize_append (c->serializer); @@ -164,7 +164,7 @@ struct PairPosFormat1_3 unsigned format1 = 0; unsigned format2 = 0; - for (const Offset16To& _ : + for (const auto & _ : + hb_zip (this+coverage, pairSet) | hb_filter (glyphset, hb_first) | hb_map (hb_second)) { const PairSet& set = (this + _);