[subset] Compute set max using previous()

This commit is contained in:
Behdad Esfahbod 2022-05-05 10:48:24 -06:00
parent 00cb8c629d
commit 8bfeea4828
1 changed files with 3 additions and 4 deletions

View File

@ -442,10 +442,9 @@ _create_old_gid_to_new_gid_map (const hb_face_t *face,
| hb_sink (reverse_glyph_map)
;
unsigned max_glyph =
+ hb_iter (all_gids_to_retain)
| hb_reduce (hb_max, 0u)
;
hb_codepoint_t max_glyph = HB_SET_VALUE_INVALID;
hb_set_previous (all_gids_to_retain, &max_glyph);
*num_glyphs = max_glyph + 1;
}