[subset/cff] Optimize fdselect

This commit is contained in:
Behdad Esfahbod 2023-06-05 17:17:44 -06:00
parent dcecb4d16b
commit cd8f7c0201

View file

@ -87,10 +87,10 @@ hb_plan_subset_cff_fdselect (const hb_subset_plan_t *plan,
if (old_glyph >= last_range.second)
last_range = src.get_fd_range (old_glyph);
unsigned fd = last_range.first;
set.add (fd);
if (fd != prev_fd)
{
set.add (fd);
num_ranges++;
prev_fd = fd;
fdselect_ranges.push (code_pair_t { fd, gid });