提交 1b6d0c44 编写于 作者: B Behdad Esfahbod

[subset] Sketch GDEF subsetting

上级 705e2f50
......@@ -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);
......
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册