I discovered there was an issue when I tried using a test font I created with the following as one of its lookups (in ttx format):
<Lookup index="1">
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SingleSubst index="0">
<Substitution in="j" out="i"/>
<Substitution in="zero" out="one"/>
</SingleSubst>
</Lookup>
There is one lookup here, but 2 substitutions. My program needs to iterate through each substitution individually, but the function hb_ot_layout_lookup_collect_glyphs only returns 2 unordered sets representing all the input and output characters for this lookup. How can I get one substitution at a time?