From: Behdad Esfahbod Date: Thu, 2 May 2019 23:26:06 +0000 (-0700) Subject: [name] Add NameRecord::copy() X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8855af38a8497d7788924d368baa9eeae4916940;p=platform%2Fupstream%2FlibHarfBuzzSharp.git [name] Add NameRecord::copy() --- diff --git a/src/hb-ot-name-table.hh b/src/hb-ot-name-table.hh index 10a2255..00686ee 100644 --- a/src/hb-ot-name-table.hh +++ b/src/hb-ot-name-table.hh @@ -95,6 +95,16 @@ struct NameRecord return UNSUPPORTED; } + NameRecord* copy (hb_serialize_context_t *c, + const void *src_base, + const void *dst_base) const + { + auto *out = c->embed (this); + out->offset = 0; + out->offset.serialize_copy (c, src_base + offset, dst_base, length); + return out; + } + bool sanitize (hb_sanitize_context_t *c, const void *base) const { TRACE_SANITIZE (this);