[autofit] Speed up computation of `af_reverse_character_map_new`. (1/4)
Using HarfBuzz's API functions to construct the reverse map is too slow; we
have to call `hb_ot_layout_lookup_get_glyph_alternates` far too often
because it can only handle a single glyph at a time. For this reason we are
going to parse the GSUB table by ourselves.
The new non-local functions are `af_parse_gsub` and `af_map_lookup`.
* src/autofit/afgsub.c, src/autofit/afgsub.h: New files for parsing,
validating, and mapping the `SingleSubst` and `AlternateSubst` subtable
types of a GSUB table.
* src/autofit/autofit.c, src/autofit/rules.mk (AUTOF_DRV_SRC): Updated.
4 files changed