[subset] Fixes to get GPOS 5 subsetting code compiling.

This commit is contained in:
Garret Rieger 2020-10-01 16:44:16 -07:00
parent 3a0b05faf1
commit 147e93b910
1 changed files with 28 additions and 9 deletions

View File

@ -544,7 +544,8 @@ struct AnchorMatrix
hb_requires (hb_is_iterator (Iterator))>
bool serialize (hb_serialize_context_t *c,
unsigned num_rows,
const AnchorMatrix *offset_matrix,
AnchorMatrix const *offset_matrix,
const hb_map_t *layout_variation_idx_map,
Iterator index_iter)
{
TRACE_SERIALIZE (this);
@ -582,7 +583,11 @@ struct AnchorMatrix
;
}
out->serialize (c->serializer, (unsigned) rows, this, indexes.iter ());
out->serialize (c->serializer,
(unsigned) rows,
this,
c->plan->layout_variation_idx_map,
indexes.iter ());
return_trace (true);
}
@ -2057,14 +2062,20 @@ struct LigatureArray : OffsetListOf<LigatureAttach>
Iterator ligature_iter)
{
TRACE_SERIALIZE (this);
if (!ligature_iter.len ()) return_trace (false);
if (unlikely (!c->serializer->extend_min ((*this)))) return_trace (false);
for (unsigned i : ligature_iter)
{
auto *out = serialize_append (c->serializer);
if (unlikely (!out)) break;
out->serialize_subset (c, src_lig_array.arrayZ[i], &src_lig_array, this, cols, klass_mapping);
out->serialize_subset (c,
src_lig_array.arrayZ[i],
&src_lig_array,
cols,
klass_mapping);
}
return_trace (this->len);
}
@ -2200,7 +2211,11 @@ struct MarkLigPosFormat1
return_trace (false);
out->markArray.serialize (c->serializer, out)
.serialize (c->serializer, &klass_mapping, &(this+markArray), + mark_iter
.serialize (c->serializer,
&klass_mapping,
c->plan->layout_variation_idx_map,
&(this+markArray),
+ mark_iter
| hb_map (hb_second));
unsigned ligcount = (this+ligatureArray).len;
@ -2221,7 +2236,11 @@ struct MarkLigPosFormat1
return_trace (false);
out->ligatureArray.serialize (c->serializer, out)
.subset (c, (unsigned) classCount, &klass_mapping, this+ligatureArray, + ligature_iter
.subset (c,
(unsigned) classCount,
&klass_mapping,
this+ligatureArray,
+ ligature_iter
| hb_map (hb_second));
return_trace (true);