From a80a42725fcbfb57bbd17526cde03c70c4ed9e2c Mon Sep 17 00:00:00 2001 From: Skef Iterum Date: Sun, 11 Jan 2026 22:48:21 -0800 Subject: [PATCH] Fix depend code for wrapped format structs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After rebasing onto main, the depend code needs to use format.v instead of format directly, due to main's "Wrap formats in struct" change (346b8dcf9). Updated: - hb-ot-cmap-table.hh: _.u.format == 14 → _.u.format.v == 14 - COLR.hh: switch (u.format) → switch (u.format.v) --- src/OT/Color/COLR/COLR.hh | 2 +- src/hb-ot-cmap-table.hh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/OT/Color/COLR/COLR.hh b/src/OT/Color/COLR/COLR.hh index 30e459b96..2967e8096 100644 --- a/src/OT/Color/COLR/COLR.hh +++ b/src/OT/Color/COLR/COLR.hh @@ -1757,7 +1757,7 @@ struct ClipBox #ifdef HB_DEPEND_API void dependv1 (hb_colrv1_depend_context_t* c) const { - switch (u.format) { + switch (u.format.v) { case 2: u.format2.dependv1 (c); default:return; } diff --git a/src/hb-ot-cmap-table.hh b/src/hb-ot-cmap-table.hh index 4a0866d2e..284de104b 100644 --- a/src/hb-ot-cmap-table.hh +++ b/src/hb-ot-cmap-table.hh @@ -1950,7 +1950,7 @@ struct cmap + hb_iter (encodingRecord) | hb_map (&EncodingRecord::subtable) | hb_map (hb_add (this)) - | hb_filter ([&] (const CmapSubtable& _) { return _.u.format == 14; }) + | hb_filter ([&] (const CmapSubtable& _) { return _.u.format.v == 14; }) | hb_apply ([=] (const CmapSubtable& _) { _.u.format14.depend (depend_data); }) ; }