diff --git a/src/hb-ot-layout-gdef-table.hh b/src/hb-ot-layout-gdef-table.hh index f1052d8f3..84e09d21d 100644 --- a/src/hb-ot-layout-gdef-table.hh +++ b/src/hb-ot-layout-gdef-table.hh @@ -438,6 +438,26 @@ struct GDEF (version.to_int () >= 0x00010003u ? varStore.static_size : 0); } + inline bool subset (hb_subset_context_t *c) const + { + TRACE_SUBSET (this); + struct GDEF *out = c->serializer->embed (*this); + if (unlikely (!out)) return_trace (false); + + out->glyphClassDef.serialize_subset (c, this+glyphClassDef, out); + out->attachList.set (0);//TODO(subset) serialize_subset (c, this+attachList, out); + out->ligCaretList.set (0);//TODO(subset) serialize_subset (c, this+ligCaretList, out); + out->markAttachClassDef.serialize_subset (c, this+markAttachClassDef, out); + + if (version.to_int () >= 0x00010002u) + out->markGlyphSetsDef.set (0);// TODO(subset) serialize_subset (c, this+markGlyphSetsDef, out); + + if (version.to_int () >= 0x00010003u) + out->varStore.set (0);// TODO(subset) serialize_subset (c, this+varStore, out); + + return_trace (true); + } + inline bool sanitize (hb_sanitize_context_t *c) const { TRACE_SANITIZE (this); diff --git a/src/hb-ot-layout-gsubgpos.hh b/src/hb-ot-layout-gsubgpos.hh index cdfaccaae..2e10f5373 100644 --- a/src/hb-ot-layout-gsubgpos.hh +++ b/src/hb-ot-layout-gsubgpos.hh @@ -2710,6 +2710,7 @@ struct GSUBGPOS TRACE_SUBSET (this); struct GSUBGPOS *out = c->serializer->embed (*this); if (unlikely (!out)) return_trace (false); + out->scriptList.serialize_subset (c, this+scriptList, out); out->featureList.serialize_subset (c, this+featureList, out); @@ -2722,6 +2723,7 @@ struct GSUBGPOS if (version.to_int () >= 0x00010001u) out->featureVars.serialize_subset (c, this+featureVars, out); + return_trace (true); }