s/OffsetArrayOf/Array16OfOffset16To/g

This commit is contained in:
Behdad Esfahbod 2021-03-31 15:31:32 -06:00
parent 1fc6b69aed
commit 6c4e0491d7
7 changed files with 52 additions and 52 deletions

View File

@ -715,13 +715,13 @@ using LArrayOf = ArrayOf<Type, HBUINT32>;
using PString = ArrayOf<HBUINT8, HBUINT8>; using PString = ArrayOf<HBUINT8, HBUINT8>;
/* Array of Offset's */ /* Array of Offset's */
template <typename Type> using OffsetArrayOf = ArrayOf<OffsetTo<Type, HBUINT16>, HBUINT16>; template <typename Type> using Array16OfOffset16To = ArrayOf<OffsetTo<Type, HBUINT16>, HBUINT16>;
template <typename Type> using Array16OfOffset32To = ArrayOf<OffsetTo<Type, HBUINT32>>; template <typename Type> using Array16OfOffset32To = ArrayOf<OffsetTo<Type, HBUINT32>>;
template <typename Type> using Array32OfOffset32To = ArrayOf<OffsetTo<Type, HBUINT32>, HBUINT32>; template <typename Type> using Array32OfOffset32To = ArrayOf<OffsetTo<Type, HBUINT32>, HBUINT32>;
/* Array of offsets relative to the beginning of the array itself. */ /* Array of offsets relative to the beginning of the array itself. */
template <typename Type> template <typename Type>
struct OffsetListOf : OffsetArrayOf<Type> struct OffsetListOf : Array16OfOffset16To<Type>
{ {
const Type& operator [] (int i_) const const Type& operator [] (int i_) const
{ {
@ -751,7 +751,7 @@ struct OffsetListOf : OffsetArrayOf<Type>
bool sanitize (hb_sanitize_context_t *c, Ts&&... ds) const bool sanitize (hb_sanitize_context_t *c, Ts&&... ds) const
{ {
TRACE_SANITIZE (this); TRACE_SANITIZE (this);
return_trace (OffsetArrayOf<Type>::sanitize (c, this, hb_forward<Ts> (ds)...)); return_trace (Array16OfOffset16To<Type>::sanitize (c, this, hb_forward<Ts> (ds)...));
} }
}; };

View File

@ -247,7 +247,7 @@ struct BaseValues
Index defaultIndex; /* Index number of default baseline for this Index defaultIndex; /* Index number of default baseline for this
* script equals index position of baseline tag * script equals index position of baseline tag
* in baselineTags array of the BaseTagList */ * in baselineTags array of the BaseTagList */
OffsetArrayOf<BaseCoord> Array16OfOffset16To<BaseCoord>
baseCoords; /* Number of BaseCoord tables defined — should equal baseCoords; /* Number of BaseCoord tables defined — should equal
* baseTagCount in the BaseTagList * baseTagCount in the BaseTagList
* *

View File

@ -1204,11 +1204,11 @@ struct Lookup
unsigned int get_subtable_count () const { return subTable.len; } unsigned int get_subtable_count () const { return subTable.len; }
template <typename TSubTable> template <typename TSubTable>
const OffsetArrayOf<TSubTable>& get_subtables () const const Array16OfOffset16To<TSubTable>& get_subtables () const
{ return reinterpret_cast<const OffsetArrayOf<TSubTable> &> (subTable); } { return reinterpret_cast<const Array16OfOffset16To<TSubTable> &> (subTable); }
template <typename TSubTable> template <typename TSubTable>
OffsetArrayOf<TSubTable>& get_subtables () Array16OfOffset16To<TSubTable>& get_subtables ()
{ return reinterpret_cast<OffsetArrayOf<TSubTable> &> (subTable); } { return reinterpret_cast<Array16OfOffset16To<TSubTable> &> (subTable); }
template <typename TSubTable> template <typename TSubTable>
const TSubTable& get_subtable (unsigned int i) const const TSubTable& get_subtable (unsigned int i) const

View File

@ -113,7 +113,7 @@ struct AttachList
Offset16To<Coverage> Offset16To<Coverage>
coverage; /* Offset to Coverage table -- from coverage; /* Offset to Coverage table -- from
* beginning of AttachList table */ * beginning of AttachList table */
OffsetArrayOf<AttachPoint> Array16OfOffset16To<AttachPoint>
attachPoint; /* Array of AttachPoint tables attachPoint; /* Array of AttachPoint tables
* in Coverage Index order */ * in Coverage Index order */
public: public:
@ -340,7 +340,7 @@ struct LigGlyph
} }
protected: protected:
OffsetArrayOf<CaretValue> Array16OfOffset16To<CaretValue>
carets; /* Offset array of CaretValue tables carets; /* Offset array of CaretValue tables
* --from beginning of LigGlyph table * --from beginning of LigGlyph table
* --in increasing coordinate order */ * --in increasing coordinate order */
@ -411,7 +411,7 @@ struct LigCaretList
Offset16To<Coverage> Offset16To<Coverage>
coverage; /* Offset to Coverage table--from coverage; /* Offset to Coverage table--from
* beginning of LigCaretList table */ * beginning of LigCaretList table */
OffsetArrayOf<LigGlyph> Array16OfOffset16To<LigGlyph>
ligGlyph; /* Array of LigGlyph tables ligGlyph; /* Array of LigGlyph tables
* in Coverage Index order */ * in Coverage Index order */
public: public:

View File

@ -1337,7 +1337,7 @@ struct PairPosFormat1
/* [1] Defines the types of data in /* [1] Defines the types of data in
* ValueRecord2--for the second glyph * ValueRecord2--for the second glyph
* in the pair--may be zero (0) */ * in the pair--may be zero (0) */
OffsetArrayOf<PairSet> Array16OfOffset16To<PairSet>
pairSet; /* Array of PairSet tables pairSet; /* Array of PairSet tables
* ordered by Coverage Index */ * ordered by Coverage Index */
public: public:

View File

@ -491,7 +491,7 @@ struct MultipleSubstFormat1
Offset16To<Coverage> Offset16To<Coverage>
coverage; /* Offset to Coverage table--from coverage; /* Offset to Coverage table--from
* beginning of Substitution table */ * beginning of Substitution table */
OffsetArrayOf<Sequence> Array16OfOffset16To<Sequence>
sequence; /* Array of Sequence tables sequence; /* Array of Sequence tables
* ordered by Coverage Index */ * ordered by Coverage Index */
public: public:
@ -730,7 +730,7 @@ struct AlternateSubstFormat1
Offset16To<Coverage> Offset16To<Coverage>
coverage; /* Offset to Coverage table--from coverage; /* Offset to Coverage table--from
* beginning of Substitution table */ * beginning of Substitution table */
OffsetArrayOf<AlternateSet> Array16OfOffset16To<AlternateSet>
alternateSet; /* Array of AlternateSet tables alternateSet; /* Array of AlternateSet tables
* ordered by Coverage Index */ * ordered by Coverage Index */
public: public:
@ -982,7 +982,7 @@ struct LigatureSet
} }
protected: protected:
OffsetArrayOf<Ligature> Array16OfOffset16To<Ligature>
ligature; /* Array LigatureSet tables ligature; /* Array LigatureSet tables
* ordered by preference */ * ordered by preference */
public: public:
@ -1110,7 +1110,7 @@ struct LigatureSubstFormat1
Offset16To<Coverage> Offset16To<Coverage>
coverage; /* Offset to Coverage table--from coverage; /* Offset to Coverage table--from
* beginning of Substitution table */ * beginning of Substitution table */
OffsetArrayOf<LigatureSet> Array16OfOffset16To<LigatureSet>
ligatureSet; /* Array LigatureSet tables ligatureSet; /* Array LigatureSet tables
* ordered by Coverage Index */ * ordered by Coverage Index */
public: public:
@ -1178,7 +1178,7 @@ struct ReverseChainSingleSubstFormat1
if (!(this+coverage).intersects (glyphs)) if (!(this+coverage).intersects (glyphs))
return false; return false;
const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage>> (backtrack); const Array16OfOffset16To<Coverage> &lookahead = StructAfter<Array16OfOffset16To<Coverage>> (backtrack);
unsigned int count; unsigned int count;
@ -1202,7 +1202,7 @@ struct ReverseChainSingleSubstFormat1
{ {
if (!intersects (c->glyphs)) return; if (!intersects (c->glyphs)) return;
const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage>> (backtrack); const Array16OfOffset16To<Coverage> &lookahead = StructAfter<Array16OfOffset16To<Coverage>> (backtrack);
const ArrayOf<HBGlyphID> &substitute = StructAfter<ArrayOf<HBGlyphID>> (lookahead); const ArrayOf<HBGlyphID> &substitute = StructAfter<ArrayOf<HBGlyphID>> (lookahead);
+ hb_zip (this+coverage, substitute) + hb_zip (this+coverage, substitute)
@ -1224,7 +1224,7 @@ struct ReverseChainSingleSubstFormat1
for (unsigned int i = 0; i < count; i++) for (unsigned int i = 0; i < count; i++)
if (unlikely (!(this+backtrack[i]).collect_coverage (c->before))) return; if (unlikely (!(this+backtrack[i]).collect_coverage (c->before))) return;
const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage>> (backtrack); const Array16OfOffset16To<Coverage> &lookahead = StructAfter<Array16OfOffset16To<Coverage>> (backtrack);
count = lookahead.len; count = lookahead.len;
for (unsigned int i = 0; i < count; i++) for (unsigned int i = 0; i < count; i++)
if (unlikely (!(this+lookahead[i]).collect_coverage (c->after))) return; if (unlikely (!(this+lookahead[i]).collect_coverage (c->after))) return;
@ -1248,7 +1248,7 @@ struct ReverseChainSingleSubstFormat1
unsigned int index = (this+coverage).get_coverage (c->buffer->cur ().codepoint); unsigned int index = (this+coverage).get_coverage (c->buffer->cur ().codepoint);
if (likely (index == NOT_COVERED)) return_trace (false); if (likely (index == NOT_COVERED)) return_trace (false);
const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage>> (backtrack); const Array16OfOffset16To<Coverage> &lookahead = StructAfter<Array16OfOffset16To<Coverage>> (backtrack);
const ArrayOf<HBGlyphID> &substitute = StructAfter<ArrayOf<HBGlyphID>> (lookahead); const ArrayOf<HBGlyphID> &substitute = StructAfter<ArrayOf<HBGlyphID>> (lookahead);
if (unlikely (index >= substitute.len)) return_trace (false); if (unlikely (index >= substitute.len)) return_trace (false);
@ -1279,7 +1279,7 @@ struct ReverseChainSingleSubstFormat1
bool serialize_coverage_offset_array (hb_subset_context_t *c, Iterator it) const bool serialize_coverage_offset_array (hb_subset_context_t *c, Iterator it) const
{ {
TRACE_SERIALIZE (this); TRACE_SERIALIZE (this);
auto *out = c->serializer->start_embed<OffsetArrayOf<Coverage>> (); auto *out = c->serializer->start_embed<Array16OfOffset16To<Coverage>> ();
if (unlikely (!c->serializer->allocate_size<HBUINT16> (HBUINT16::static_size))) if (unlikely (!c->serializer->allocate_size<HBUINT16> (HBUINT16::static_size)))
return_trace (false); return_trace (false);
@ -1336,7 +1336,7 @@ struct ReverseChainSingleSubstFormat1
const hb_set_t &glyphset = *c->plan->glyphset_gsub (); const hb_set_t &glyphset = *c->plan->glyphset_gsub ();
const hb_map_t &glyph_map = *c->plan->glyph_map; const hb_map_t &glyph_map = *c->plan->glyph_map;
const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage>> (backtrack); const Array16OfOffset16To<Coverage> &lookahead = StructAfter<Array16OfOffset16To<Coverage>> (backtrack);
const ArrayOf<HBGlyphID> &substitute = StructAfter<ArrayOf<HBGlyphID>> (lookahead); const ArrayOf<HBGlyphID> &substitute = StructAfter<ArrayOf<HBGlyphID>> (lookahead);
auto it = auto it =
@ -1355,7 +1355,7 @@ struct ReverseChainSingleSubstFormat1
TRACE_SANITIZE (this); TRACE_SANITIZE (this);
if (!(coverage.sanitize (c, this) && backtrack.sanitize (c, this))) if (!(coverage.sanitize (c, this) && backtrack.sanitize (c, this)))
return_trace (false); return_trace (false);
const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage>> (backtrack); const Array16OfOffset16To<Coverage> &lookahead = StructAfter<Array16OfOffset16To<Coverage>> (backtrack);
if (!lookahead.sanitize (c, this)) if (!lookahead.sanitize (c, this))
return_trace (false); return_trace (false);
const ArrayOf<HBGlyphID> &substitute = StructAfter<ArrayOf<HBGlyphID>> (lookahead); const ArrayOf<HBGlyphID> &substitute = StructAfter<ArrayOf<HBGlyphID>> (lookahead);
@ -1367,11 +1367,11 @@ struct ReverseChainSingleSubstFormat1
Offset16To<Coverage> Offset16To<Coverage>
coverage; /* Offset to Coverage table--from coverage; /* Offset to Coverage table--from
* beginning of table */ * beginning of table */
OffsetArrayOf<Coverage> Array16OfOffset16To<Coverage>
backtrack; /* Array of coverage tables backtrack; /* Array of coverage tables
* in backtracking sequence, in glyph * in backtracking sequence, in glyph
* sequence order */ * sequence order */
OffsetArrayOf<Coverage> Array16OfOffset16To<Coverage>
lookaheadX; /* Array of coverage tables lookaheadX; /* Array of coverage tables
* in lookahead sequence, in glyph * in lookahead sequence, in glyph
* sequence order */ * sequence order */

View File

@ -1763,7 +1763,7 @@ struct RuleSet
} }
protected: protected:
OffsetArrayOf<Rule> Array16OfOffset16To<Rule>
rule; /* Array of Rule tables rule; /* Array of Rule tables
* ordered by preference */ * ordered by preference */
public: public:
@ -1908,7 +1908,7 @@ struct ContextFormat1
Offset16To<Coverage> Offset16To<Coverage>
coverage; /* Offset to Coverage table--from coverage; /* Offset to Coverage table--from
* beginning of table */ * beginning of table */
OffsetArrayOf<RuleSet> Array16OfOffset16To<RuleSet>
ruleSet; /* Array of RuleSet tables ruleSet; /* Array of RuleSet tables
* ordered by Coverage Index */ * ordered by Coverage Index */
public: public:
@ -2103,7 +2103,7 @@ struct ContextFormat2
Offset16To<ClassDef> Offset16To<ClassDef>
classDef; /* Offset to glyph ClassDef table--from classDef; /* Offset to glyph ClassDef table--from
* beginning of table */ * beginning of table */
OffsetArrayOf<RuleSet> Array16OfOffset16To<RuleSet>
ruleSet; /* Array of RuleSet tables ruleSet; /* Array of RuleSet tables
* ordered by class */ * ordered by class */
public: public:
@ -2733,7 +2733,7 @@ struct ChainRuleSet
} }
protected: protected:
OffsetArrayOf<ChainRule> Array16OfOffset16To<ChainRule>
rule; /* Array of ChainRule tables rule; /* Array of ChainRule tables
* ordered by preference */ * ordered by preference */
public: public:
@ -2876,7 +2876,7 @@ struct ChainContextFormat1
Offset16To<Coverage> Offset16To<Coverage>
coverage; /* Offset to Coverage table--from coverage; /* Offset to Coverage table--from
* beginning of table */ * beginning of table */
OffsetArrayOf<ChainRuleSet> Array16OfOffset16To<ChainRuleSet>
ruleSet; /* Array of ChainRuleSet tables ruleSet; /* Array of ChainRuleSet tables
* ordered by Coverage Index */ * ordered by Coverage Index */
public: public:
@ -3127,7 +3127,7 @@ struct ChainContextFormat2
lookaheadClassDef; /* Offset to glyph ClassDef table lookaheadClassDef; /* Offset to glyph ClassDef table
* containing lookahead sequence * containing lookahead sequence
* data--from beginning of table */ * data--from beginning of table */
OffsetArrayOf<ChainRuleSet> Array16OfOffset16To<ChainRuleSet>
ruleSet; /* Array of ChainRuleSet tables ruleSet; /* Array of ChainRuleSet tables
* ordered by class */ * ordered by class */
public: public:
@ -3138,12 +3138,12 @@ struct ChainContextFormat3
{ {
bool intersects (const hb_set_t *glyphs) const bool intersects (const hb_set_t *glyphs) const
{ {
const OffsetArrayOf<Coverage> &input = StructAfter<OffsetArrayOf<Coverage>> (backtrack); const Array16OfOffset16To<Coverage> &input = StructAfter<Array16OfOffset16To<Coverage>> (backtrack);
if (!(this+input[0]).intersects (glyphs)) if (!(this+input[0]).intersects (glyphs))
return false; return false;
const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage>> (input); const Array16OfOffset16To<Coverage> &lookahead = StructAfter<Array16OfOffset16To<Coverage>> (input);
struct ChainContextClosureLookupContext lookup_context = { struct ChainContextClosureLookupContext lookup_context = {
{intersects_coverage, intersected_coverage_glyphs}, {intersects_coverage, intersected_coverage_glyphs},
ContextFormat::CoverageBasedContext, ContextFormat::CoverageBasedContext,
@ -3161,7 +3161,7 @@ struct ChainContextFormat3
void closure (hb_closure_context_t *c) const void closure (hb_closure_context_t *c) const
{ {
const OffsetArrayOf<Coverage> &input = StructAfter<OffsetArrayOf<Coverage>> (backtrack); const Array16OfOffset16To<Coverage> &input = StructAfter<Array16OfOffset16To<Coverage>> (backtrack);
if (!(this+input[0]).intersects (c->glyphs)) if (!(this+input[0]).intersects (c->glyphs))
return; return;
@ -3169,7 +3169,7 @@ struct ChainContextFormat3
c->cur_intersected_glyphs->clear (); c->cur_intersected_glyphs->clear ();
get_coverage ().intersected_coverage_glyphs (c->parent_active_glyphs (), c->cur_intersected_glyphs); get_coverage ().intersected_coverage_glyphs (c->parent_active_glyphs (), c->cur_intersected_glyphs);
const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage>> (input); const Array16OfOffset16To<Coverage> &lookahead = StructAfter<Array16OfOffset16To<Coverage>> (input);
const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord>> (lookahead); const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord>> (lookahead);
struct ChainContextClosureLookupContext lookup_context = { struct ChainContextClosureLookupContext lookup_context = {
{intersects_coverage, intersected_coverage_glyphs}, {intersects_coverage, intersected_coverage_glyphs},
@ -3189,8 +3189,8 @@ struct ChainContextFormat3
if (!intersects (c->glyphs)) if (!intersects (c->glyphs))
return; return;
const OffsetArrayOf<Coverage> &input = StructAfter<OffsetArrayOf<Coverage>> (backtrack); const Array16OfOffset16To<Coverage> &input = StructAfter<Array16OfOffset16To<Coverage>> (backtrack);
const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage>> (input); const Array16OfOffset16To<Coverage> &lookahead = StructAfter<Array16OfOffset16To<Coverage>> (input);
const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord>> (lookahead); const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord>> (lookahead);
recurse_lookups (c, lookup.len, lookup.arrayZ); recurse_lookups (c, lookup.len, lookup.arrayZ);
} }
@ -3199,11 +3199,11 @@ struct ChainContextFormat3
void collect_glyphs (hb_collect_glyphs_context_t *c) const void collect_glyphs (hb_collect_glyphs_context_t *c) const
{ {
const OffsetArrayOf<Coverage> &input = StructAfter<OffsetArrayOf<Coverage>> (backtrack); const Array16OfOffset16To<Coverage> &input = StructAfter<Array16OfOffset16To<Coverage>> (backtrack);
(this+input[0]).collect_coverage (c->input); (this+input[0]).collect_coverage (c->input);
const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage>> (input); const Array16OfOffset16To<Coverage> &lookahead = StructAfter<Array16OfOffset16To<Coverage>> (input);
const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord>> (lookahead); const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord>> (lookahead);
struct ChainContextCollectGlyphsLookupContext lookup_context = { struct ChainContextCollectGlyphsLookupContext lookup_context = {
{collect_coverage}, {collect_coverage},
@ -3219,8 +3219,8 @@ struct ChainContextFormat3
bool would_apply (hb_would_apply_context_t *c) const bool would_apply (hb_would_apply_context_t *c) const
{ {
const OffsetArrayOf<Coverage> &input = StructAfter<OffsetArrayOf<Coverage>> (backtrack); const Array16OfOffset16To<Coverage> &input = StructAfter<Array16OfOffset16To<Coverage>> (backtrack);
const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage>> (input); const Array16OfOffset16To<Coverage> &lookahead = StructAfter<Array16OfOffset16To<Coverage>> (input);
const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord>> (lookahead); const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord>> (lookahead);
struct ChainContextApplyLookupContext lookup_context = { struct ChainContextApplyLookupContext lookup_context = {
{match_coverage}, {match_coverage},
@ -3235,19 +3235,19 @@ struct ChainContextFormat3
const Coverage &get_coverage () const const Coverage &get_coverage () const
{ {
const OffsetArrayOf<Coverage> &input = StructAfter<OffsetArrayOf<Coverage>> (backtrack); const Array16OfOffset16To<Coverage> &input = StructAfter<Array16OfOffset16To<Coverage>> (backtrack);
return this+input[0]; return this+input[0];
} }
bool apply (hb_ot_apply_context_t *c) const bool apply (hb_ot_apply_context_t *c) const
{ {
TRACE_APPLY (this); TRACE_APPLY (this);
const OffsetArrayOf<Coverage> &input = StructAfter<OffsetArrayOf<Coverage>> (backtrack); const Array16OfOffset16To<Coverage> &input = StructAfter<Array16OfOffset16To<Coverage>> (backtrack);
unsigned int index = (this+input[0]).get_coverage (c->buffer->cur().codepoint); unsigned int index = (this+input[0]).get_coverage (c->buffer->cur().codepoint);
if (likely (index == NOT_COVERED)) return_trace (false); if (likely (index == NOT_COVERED)) return_trace (false);
const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage>> (input); const Array16OfOffset16To<Coverage> &lookahead = StructAfter<Array16OfOffset16To<Coverage>> (input);
const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord>> (lookahead); const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord>> (lookahead);
struct ChainContextApplyLookupContext lookup_context = { struct ChainContextApplyLookupContext lookup_context = {
{match_coverage}, {match_coverage},
@ -3265,7 +3265,7 @@ struct ChainContextFormat3
bool serialize_coverage_offsets (hb_subset_context_t *c, Iterator it, const void* base) const bool serialize_coverage_offsets (hb_subset_context_t *c, Iterator it, const void* base) const
{ {
TRACE_SERIALIZE (this); TRACE_SERIALIZE (this);
auto *out = c->serializer->start_embed<OffsetArrayOf<Coverage>> (); auto *out = c->serializer->start_embed<Array16OfOffset16To<Coverage>> ();
if (unlikely (!c->serializer->allocate_size<HBUINT16> (HBUINT16::static_size))) if (unlikely (!c->serializer->allocate_size<HBUINT16> (HBUINT16::static_size)))
return_trace (false); return_trace (false);
@ -3290,11 +3290,11 @@ struct ChainContextFormat3
if (!serialize_coverage_offsets (c, backtrack.iter (), this)) if (!serialize_coverage_offsets (c, backtrack.iter (), this))
return_trace (false); return_trace (false);
const OffsetArrayOf<Coverage> &input = StructAfter<OffsetArrayOf<Coverage>> (backtrack); const Array16OfOffset16To<Coverage> &input = StructAfter<Array16OfOffset16To<Coverage>> (backtrack);
if (!serialize_coverage_offsets (c, input.iter (), this)) if (!serialize_coverage_offsets (c, input.iter (), this))
return_trace (false); return_trace (false);
const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage>> (input); const Array16OfOffset16To<Coverage> &lookahead = StructAfter<Array16OfOffset16To<Coverage>> (input);
if (!serialize_coverage_offsets (c, lookahead.iter (), this)) if (!serialize_coverage_offsets (c, lookahead.iter (), this))
return_trace (false); return_trace (false);
@ -3314,10 +3314,10 @@ struct ChainContextFormat3
{ {
TRACE_SANITIZE (this); TRACE_SANITIZE (this);
if (!backtrack.sanitize (c, this)) return_trace (false); if (!backtrack.sanitize (c, this)) return_trace (false);
const OffsetArrayOf<Coverage> &input = StructAfter<OffsetArrayOf<Coverage>> (backtrack); const Array16OfOffset16To<Coverage> &input = StructAfter<Array16OfOffset16To<Coverage>> (backtrack);
if (!input.sanitize (c, this)) return_trace (false); if (!input.sanitize (c, this)) return_trace (false);
if (!input.len) return_trace (false); /* To be consistent with Context. */ if (!input.len) return_trace (false); /* To be consistent with Context. */
const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage>> (input); const Array16OfOffset16To<Coverage> &lookahead = StructAfter<Array16OfOffset16To<Coverage>> (input);
if (!lookahead.sanitize (c, this)) return_trace (false); if (!lookahead.sanitize (c, this)) return_trace (false);
const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord>> (lookahead); const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord>> (lookahead);
return_trace (lookup.sanitize (c)); return_trace (lookup.sanitize (c));
@ -3325,15 +3325,15 @@ struct ChainContextFormat3
protected: protected:
HBUINT16 format; /* Format identifier--format = 3 */ HBUINT16 format; /* Format identifier--format = 3 */
OffsetArrayOf<Coverage> Array16OfOffset16To<Coverage>
backtrack; /* Array of coverage tables backtrack; /* Array of coverage tables
* in backtracking sequence, in glyph * in backtracking sequence, in glyph
* sequence order */ * sequence order */
OffsetArrayOf<Coverage> Array16OfOffset16To<Coverage>
inputX ; /* Array of coverage inputX ; /* Array of coverage
* tables in input sequence, in glyph * tables in input sequence, in glyph
* sequence order */ * sequence order */
OffsetArrayOf<Coverage> Array16OfOffset16To<Coverage>
lookaheadX; /* Array of coverage tables lookaheadX; /* Array of coverage tables
* in lookahead sequence, in glyph * in lookahead sequence, in glyph
* sequence order */ * sequence order */