Ouch.
if (unlikely (!out)) return_trace (false);
unsigned int count = this->len;
for (unsigned int i = 0; i < count; i++)
- out->arrayZ[i].serialize_subset (c, (*this)[i], this);
+ out->arrayZ[i].serialize_subset (c, (*this)[i], out);
return_trace (true);
}
if (unlikely (!out)) return_trace (false);
unsigned int count = this->len;
for (unsigned int i = 0; i < count; i++)
- out->get_offset (i).serialize_subset (c, (*this)[i], this);
+ out->get_offset (i).serialize_subset (c, (*this)[i], out);
return_trace (true);
}
TRACE_SUBSET (this);
struct Script *out = c->serializer->embed (*this);
if (unlikely (!out)) return_trace (false);
- out->defaultLangSys.serialize_subset (c, this+defaultLangSys, this);
+ out->defaultLangSys.serialize_subset (c, this+defaultLangSys, out);
unsigned int count = langSys.len;
for (unsigned int i = 0; i < count; i++)
- out->langSys.arrayZ[i].offset.serialize_subset (c, this+langSys[i].offset, this);
+ out->langSys.arrayZ[i].offset.serialize_subset (c, this+langSys[i].offset, out);
return_trace (true);
}
inline bool subset (hb_subset_context_t *c) const
{
TRACE_SUBSET (this);
- //struct GSUB *out = c->serializer->start_embed<GSUB> ();
+ struct GSUB *out = c->serializer->start_embed<GSUB> ();
if (unlikely (!GSUBGPOS::subset (c))) return_trace (false);
- /* TODO Replace following with c->iter_copy_and_subset()ish. */
- unsigned int count = get_lookup_count ();
- //LookupList &outLookupList = out+out->lookupList;
- for (unsigned int i = 0; i < count; i++)
- //XXX if (unlikely (!outLookupList.arrayZ[i].subset (c, get_lookup (i), &outLookupList)))
- return_trace (false);
+ const OffsetTo<SubstLookupList> &list = CastR<const OffsetTo<SubstLookupList> > (lookupList);
+ OffsetTo<SubstLookupList> &outList = CastR<OffsetTo<SubstLookupList> > (out->lookupList);
+ outList.set (0);
+ //outList.serialize_subset (c, this+list, out);
+ /* TODO Use intersects() to count how many subtables survive? */
return_trace (true);
}
TRACE_SUBSET (this);
struct GSUBGPOS *out = c->serializer->embed (*this);
if (unlikely (!out)) return_trace (false);
- out->scriptList.serialize_subset (c, this+scriptList, this);
- out->featureList.serialize_subset (c, this+featureList, this);
+ out->scriptList.serialize_subset (c, this+scriptList, out);
+ out->featureList.serialize_subset (c, this+featureList, out);
out->lookupList.set (0); /* GSUB/GPOS fill this one in. */
if (version.to_int () >= 0x00010001u)
- out->featureVars.serialize_subset (c, this+featureVars, this);
+ out->featureVars.serialize_subset (c, this+featureVars, out);
return_trace (true);
}