From c6279224dbe5b2b8d3895cd91429178fc408e23a Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 21 Nov 2022 18:01:50 -0700 Subject: [PATCH] [cff] Adjust pre-allocation This better matches actual usage, given that ops are one or two bytes, and vector also allocates 50% extra. --- src/hb-subset-cff-common.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hb-subset-cff-common.hh b/src/hb-subset-cff-common.hh index dbde64ce7..14d0b4341 100644 --- a/src/hb-subset-cff-common.hh +++ b/src/hb-subset-cff-common.hh @@ -565,7 +565,7 @@ struct subr_subsetter_t ENV env (str, acc, fd); cs_interpreter_t interp (env); - parsed_charstrings[i].alloc (str.length); + parsed_charstrings[i].alloc (str.length / 2); subr_subset_param_t param (&parsed_charstrings[i], &parsed_global_subrs, &parsed_local_subrs[fd],