From c03c3000164c873275a8b60fa07661a9fe74243e Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sat, 3 Jun 2023 19:05:10 -0600 Subject: [PATCH] [subset] Tweak memory allocation Reduces chances of rework, specially for glyf table if padding is needed... --- src/hb-subset.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hb-subset.cc b/src/hb-subset.cc index 9c066e6d7..2e0ed4fcd 100644 --- a/src/hb-subset.cc +++ b/src/hb-subset.cc @@ -198,9 +198,9 @@ _plan_estimate_subset_table_size (hb_subset_plan_t *plan, unsigned dst_glyphs = plan->glyphset ()->get_population (); if (unlikely (!src_glyphs) || same_size) - return 512 + table_len; + return 8192 + table_len; - return 512 + (unsigned) (table_len * sqrt ((double) dst_glyphs / src_glyphs)); + return 8192 + (unsigned) (table_len * sqrt ((double) dst_glyphs / src_glyphs)); } /* @@ -588,7 +588,7 @@ hb_subset_plan_execute_or_fail (hb_subset_plan_t *plan) } hb_vector_t buf; - buf.alloc (4096 - 16); + buf.alloc (8192 - 16); bool success = true;