[subset/hdmx] Speed up

pull/4264/head
Behdad Esfahbod 1 year ago
parent 0e16be9b2c
commit e263c3ccbb
  1. 2
      src/hb-ot-hdmx-table.hh
  2. 9
      src/hb-subset-plan.hh

@ -125,7 +125,7 @@ struct hdmx
| hb_map (c->plan->reverse_glyph_map)
| hb_map ([this, c, device_record] (hb_codepoint_t _)
{
if (c->plan->is_empty_glyph (_))
if (_ == HB_MAP_VALUE_INVALID)
return Null (HBUINT8);
return device_record->widthsZ.as_array (get_num_glyphs ()) [_];
})

@ -188,15 +188,6 @@ struct hb_subset_plan_t
return _num_output_glyphs;
}
/*
* Given an output gid , returns true if that glyph id is an empty
* glyph (ie. it's a gid that we are dropping all data for).
*/
inline bool is_empty_glyph (hb_codepoint_t gid) const
{
return !_glyphset.has (gid);
}
inline bool new_gid_for_codepoint (hb_codepoint_t codepoint,
hb_codepoint_t *new_gid) const
{

Loading…
Cancel
Save