From 3cae9c75153277b9cfaaba20e0de84e420aeb1eb Mon Sep 17 00:00:00 2001 From: Michiharu Ariza Date: Wed, 12 Sep 2018 17:23:08 -0700 Subject: [PATCH] fixed hb_plan_subset_cff_fdselect FDSelect3/4 sentinel size wasn't taken into account --- src/hb-subset-cff-common.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) {