diff --git a/src/hb-subset-cff-common.cc b/src/hb-subset-cff-common.cc index fe18510c9..3e5ac3a79 100644 --- a/src/hb-subset-cff-common.cc +++ b/src/hb-subset-cff-common.cc @@ -108,12 +108,12 @@ hb_plan_subset_cff_fdselect (const hb_vector_t &glyphs, { assert (src.format == 4); subset_fdselect_format = 4; - subset_fdselect_size = FDSelect4::min_size + FDSelect4_Range::static_size * num_ranges; + subset_fdselect_size = FDSelect4::min_size + FDSelect4_Range::static_size * num_ranges + HBUINT32::static_size; } else { unsigned int format0_size = FDSelect0::min_size + HBUINT8::static_size * subset_num_glyphs; - unsigned int format3_size = FDSelect3::min_size + FDSelect3_Range::static_size * num_ranges; + unsigned int format3_size = FDSelect3::min_size + FDSelect3_Range::static_size * num_ranges + HBUINT16::static_size; if (format0_size <= format3_size) {