From fdb80534e2d2dcbf802af4f0d8cf38fd9e9ad885 Mon Sep 17 00:00:00 2001 From: Qunxin Liu <48925186+qxliu76@users.noreply.github.com> Date: Tue, 23 Sep 2025 14:32:41 -0700 Subject: [PATCH] [subset-repacker] bug fix: copy markFilteringSet field if exists (#5579) --- src/graph/gsubgpos-graph.hh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/graph/gsubgpos-graph.hh b/src/graph/gsubgpos-graph.hh index 77ba4ee18..50dc03e3c 100644 --- a/src/graph/gsubgpos-graph.hh +++ b/src/graph/gsubgpos-graph.hh @@ -87,6 +87,12 @@ struct Lookup : public OT::Lookup return lookupType == extension_type (table_tag); } + bool use_mark_filtering_set () const + { + unsigned flag = lookupFlag; + return flag & 0x0010u; + } + bool make_extension (gsubgpos_graph_context_t& c, unsigned this_index) { @@ -220,6 +226,9 @@ struct Lookup : public OT::Lookup } hb_memcpy (buffer, v->obj.head, v->table_size()); + if (use_mark_filtering_set ()) + hb_memcpy (buffer + new_size - 2, v->obj.tail - 2, 2); + v->obj.head = buffer; v->obj.tail = buffer + new_size;