Author :
Werner Lemberg
Date :
2025-06-13 11:27:09
Hash :9bfb8e80 Message :[autofit] Speed up computation of `af_reverse_character_map_new`. (2/4)
Create an array of GSUB lookup indices for `SingleSubst` and
`AlternateSubst` lookup types to exit early if we have different types.
Also improve tracing.
* src/autofit/afglobal.h (AF_FaceGlobals) [FT_CONFIG_OPTION_USE_HARFBUZZ]:
New fields `gsub_length`, `gsub`, and `gsub_lookups_single_alternate`.
* src/autofit/afglobal.c [FT_CONFIG_OPTION_USE_HARFBUZZ]: Include
`afgsub.h`.
(af_face_globals_new) [FT_CONFIG_OPTION_USE_HARFBUZZ]: Call
`af_parse_gsub` to fill `gsub_lookups_single_alternate`.
(af_face_globals_free): Updated.
* src/autofit/afadjust.c (af_get_glyph_alternates_helper): Exit early if we
possible.
(af_reverse_character_map_new): Trace GSUB lookup indices to be checked.