fixed hb_plan_subset_cff_fdselect

FDSelect3/4 sentinel size wasn't taken into account
This commit is contained in:
Michiharu Ariza 2018-09-12 17:23:08 -07:00
parent 0f159a38a6
commit 3cae9c7515
1 changed files with 2 additions and 2 deletions

View File

@ -108,12 +108,12 @@ hb_plan_subset_cff_fdselect (const hb_vector_t<hb_codepoint_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)
{