fixed hb_plan_subset_cff_fdselect
FDSelect3/4 sentinel size wasn't taken into account
This commit is contained in:
parent
0f159a38a6
commit
3cae9c7515
|
@ -108,12 +108,12 @@ hb_plan_subset_cff_fdselect (const hb_vector_t<hb_codepoint_t> &glyphs,
|
||||||
{
|
{
|
||||||
assert (src.format == 4);
|
assert (src.format == 4);
|
||||||
subset_fdselect_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
|
else
|
||||||
{
|
{
|
||||||
unsigned int format0_size = FDSelect0::min_size + HBUINT8::static_size * subset_num_glyphs;
|
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)
|
if (format0_size <= format3_size)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue