[subset] Only used reachable lookups for gsub closure.
This commit is contained in:
parent
c38bd4025f
commit
fb58cb4b5c
|
@ -56,11 +56,15 @@ _add_gid_and_children (const OT::glyf::accelerator_t &glyf,
|
||||||
static void
|
static void
|
||||||
_gsub_closure (hb_face_t *face, hb_set_t *gids_to_retain)
|
_gsub_closure (hb_face_t *face, hb_set_t *gids_to_retain)
|
||||||
{
|
{
|
||||||
// TODO(grieger): This uses all lookups, instead collect
|
hb_auto_t<hb_set_t> lookup_indices;
|
||||||
// the set of lookups that are relevant.
|
hb_ot_layout_collect_lookups (face,
|
||||||
// See fontTools implementation.
|
HB_OT_TAG_GSUB,
|
||||||
|
nullptr,
|
||||||
|
nullptr,
|
||||||
|
nullptr,
|
||||||
|
&lookup_indices);
|
||||||
hb_ot_layout_lookups_substitute_closure (face,
|
hb_ot_layout_lookups_substitute_closure (face,
|
||||||
nullptr,
|
&lookup_indices,
|
||||||
gids_to_retain);
|
gids_to_retain);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue