subprojects/harfbuzz/src/hb-ot-layout.cc
void
hb_ot_layout_lookups_substitute_closure (hb_face_t      *face,
                                         const hb_set_t *lookups,
                                         hb_set_t       *glyphs)
{
  hb_map_t done_lookups;
  OT::hb_closure_context_t c (face, glyphs, &done_lookups);
  const OT::GSUB& gsub = *face->table.GSUB->table;

  unsigned int iteration_count = 0;
  unsigned int glyphs_length;
  do
  {
    glyphs_length = glyphs->get_population ();
    if (lookups != nullptr)
    {
      for (hb_codepoint_t lookup_index = HB_SET_VALUE_INVALID; hb_set_next (lookups, &lookup_index);)
        gsub.get_lookup (lookup_index).closure (&c, lookup_index);
    }
    else
    {
      for (unsigned int i = 0; i < gsub.get_lookup_count (); i++)
        gsub.get_lookup (i).closure (&c, i);
    }
  } while (iteration_count++ <= HB_CLOSURE_MAX_STAGES &&
	   glyphs_length != glyphs->get_population ());
}
/**
 * hb_ot_layout_lookups_substitute_closure:
 *
 * Compute the transitive closure of glyphs needed for all of the
 * provided lookups.
 *
 * Since: 1.8.1
 **/
Compute the transitive closure of glyphs needed for all of the
provided lookups.


Compute the transitive closure of glyphs needed for all of the provided lookups .
void
hb_ot_layout_lookups_substitute_closure (hb_face_t      *face,
                                         const hb_set_t *lookups,
                                         hb_set_t       *glyphs)
{
  hb_map_t done_lookups;
  OT::hb_closure_context_t c (face, glyphs, &done_lookups);
  const OT::GSUB& gsub = *face->table.GSUB->table;
  unsigned int iteration_count = 0;
  unsigned int glyphs_length;
  do
  {
    glyphs_length = glyphs->get_population ();
    if (lookups != nullptr)
    {
      for (hb_codepoint_t lookup_index = HB_SET_VALUE_INVALID; hb_set_next (lookups, &lookup_index);)
        gsub.get_lookup (lookup_index).closure (&c, lookup_index);
    }
    else
    {
      for (unsigned int i = 0; i < gsub.get_lookup_count (); i++)
        gsub.get_lookup (i).closure (&c, i);
    }
  } while (iteration_count++ <= HB_CLOSURE_MAX_STAGES &&
	   glyphs_length != glyphs->get_population ());
}
void hb_ot_layout_lookups_substitute_closure ( hb_face_t * face , const hb_set_t * lookups , hb_set_t * glyphs ) { hb_map_t done_lookups ; OT :: hb_closure_context_t c ( face , glyphs , & done_lookups ) ; const OT :: GSUB & gsub = * face -> table . GSUB -> table ; unsigned int iteration_count = 0 ; unsigned int glyphs_length ; do { glyphs_length = glyphs -> get_population ( ) ; if ( lookups != nullptr ) { for ( hb_codepoint_t lookup_index = HB_SET_VALUE_INVALID ; hb_set_next ( lookups , & lookup_index ) ; ) gsub . get_lookup ( lookup_index ) . closure ( & c , lookup_index ) ; } else { for ( unsigned int i = 0 ; i < gsub . get_lookup_count ( ) ; i ++ ) gsub . get_lookup ( i ) . closure ( & c , i ) ; } } while ( iteration_count ++ <= HB_CLOSURE_MAX_STAGES && glyphs_length != glyphs -> get_population ( ) ) ; }
hb_ot_layout_lookups_substitute_closure:
 Compute the transitive closure of glyphs needed for all of the
 provided lookups.
hb_ot_layout_lookups_substitute_closure : Compute the transitive closure of glyphs needed for all of the provided lookups .