From bab8ec58b044272d45d584e8f16c6715ca21ee89 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 21 Nov 2022 17:46:32 -0700 Subject: [PATCH] [subset-cff] Disable sharing when packing charstring INDEXes Saves another 8%ish. --- src/hb-subset-cff1.cc | 6 +++--- src/hb-subset-cff2.cc | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/hb-subset-cff1.cc b/src/hb-subset-cff1.cc index 52bb13d32..fbf1894cf 100644 --- a/src/hb-subset-cff1.cc +++ b/src/hb-subset-cff1.cc @@ -696,7 +696,7 @@ static bool _serialize_cff1 (hb_serialize_context_t *c, if (unlikely (!dest)) return false; c->push (); if (likely (dest && dest->serialize (c, plan.subset_localsubrs[i]))) - subrs_link = c->pop_pack (); + subrs_link = c->pop_pack (false); else { c->pop_discard (); @@ -732,7 +732,7 @@ static bool _serialize_cff1 (hb_serialize_context_t *c, if (unlikely (!cs)) return false; c->push (); if (likely (cs->serialize (c, plan.subset_charstrings))) - plan.info.char_strings_link = c->pop_pack (); + plan.info.char_strings_link = c->pop_pack (false); else { c->pop_discard (); @@ -815,7 +815,7 @@ static bool _serialize_cff1 (hb_serialize_context_t *c, CFF1Subrs *dest = c->start_embed (); if (unlikely (!dest)) return false; if (likely (dest->serialize (c, plan.subset_globalsubrs))) - c->pop_pack (); + c->pop_pack (false); else { c->pop_discard (); diff --git a/src/hb-subset-cff2.cc b/src/hb-subset-cff2.cc index 08e820efc..ad4c471f9 100644 --- a/src/hb-subset-cff2.cc +++ b/src/hb-subset-cff2.cc @@ -334,7 +334,7 @@ static bool _serialize_cff2 (hb_serialize_context_t *c, if (unlikely (!dest)) return false; c->push (); if (likely (dest->serialize (c, plan.subset_localsubrs[i]))) - subrs_link = c->pop_pack (); + subrs_link = c->pop_pack (false); else { c->pop_discard (); @@ -365,7 +365,7 @@ static bool _serialize_cff2 (hb_serialize_context_t *c, if (unlikely (!cs)) return false; c->push (); if (likely (cs->serialize (c, plan.subset_charstrings))) - plan.info.char_strings_link = c->pop_pack (); + plan.info.char_strings_link = c->pop_pack (false); else { c->pop_discard ();